Creates a sub-view into the screen.
A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too.
Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
If a viewport is a child of a [Control], it will automatically take up its same rect and position, otherwise they must be set manually.
Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
Also, viewports can be assigned to different screens in case the devices have multiple screens.
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
Return the 3D world of the viewport, or if no such present, the one of the parent viewport.
Return the 2D world of the viewport.
Return the active 3D camera.
Get the canvas transform of the viewport.
Get the total transform of the viewport.
Get the global canvas transform of the viewport.
Get whether the rendered texture has filters enabled.
Get the mouse position, relative to the viewport.
Get whether picking for all physics objects inside the viewport is enabled.
Return the viewport rect. If the viewport is child of a control, it will use the same rect as the parent. Otherwise, if the rect is empty, the viewport will use all the allowed space.
Get the size override set with [method set_size_override].
Get the viewport's texture, for use with various objects that you want to texture with the viewport.
Get when the viewport would be updated, will be one of the [code]UPDATE_*[/code] constants.
Set whether the render target is flipped on the Y axis.
Get the viewport RID from the [VisualServer].
Return the final, visible rect in global screen coordinates.
Return the 3D world of the viewport.
Return the 2D world of the viewport.
Returns the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
Returns whether there are shown modals on-screen.
Return whether the viewport lets whatever is behind it to show.
Returns whether the viewport sends sounds to the speakers.
Returns whether the viewport sends soundsfrom 2D emitters to the speakers.
Return whether input to the viewport is disabled.
Get the enabled status of the size override set with [method set_size_override].
Get the enabled status of the size strech override set with [method set_size_override_stretch].
Return whether the viewport is using a world separate from the parent viewport's world.
Makes the viewport send sounds to the speakers.
Makes the viewport send sounds from 2D emitters to the speakers.
Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport.
Set whether input to the viewport is disabled.
Set the global canvas transform of the viewport. The canvas transform is relative to this.
Enable/disable picking for all physics objects inside the viewport.
Set the size of the viewport.
Set the size override of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to [code](-1, -1)[/code], it won't update the size.
Set whether the size override affects stretch as well.
If this viewport is a child of another viewport, keep the previously drawn background visible.
Set when the render target would be updated, using the [code]UPDATE_*[/code] constants
If true this viewport will be bound to our ARVR Server.
If this is our main Godot viewport our AR/VR output will be displayed on screen.
If output is redirected to an HMD we'll see the output of just one of the eyes without any distortion applied else we'll see the stereo buffer with distortion applied if applicable
If this is an extra viewport output will only work if redirection to an HMD is supported by the interface. The render target will allow you to use the undistorted output for the right eye in the display.
Make the viewport use a world separate from the parent viewport's world.
Set whether the viewport is flipped on the Y axis.
Change the 3D world of the viewport.
Force update of the 2D and 3D worlds.
Returns whether this viewport is using our ARVR Server
Warp the mouse to a position, relative to the viewport.
Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means.
Do not update the render target.
Update the render target once, then switch to [code]UPDATE_DISABLED[/code]
Update the render target only when it is visible. This is the default value.