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 Camera3D 3D nodes will render on it too.
Optionally, a viewport can have its own 2D or 3D world, so it doesn't share what it draws with other viewports.
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.
Emitted when a Control node grabs keyboard focus.
Emitted when the size of the viewport is changed, whether by resizing of window, or some other means.
SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED = 0
This quadrant will not be used.
SHADOW_ATLAS_QUADRANT_SUBDIV_1 = 1
This quadrant will only be used by one shadow map.
SHADOW_ATLAS_QUADRANT_SUBDIV_4 = 2
This quadrant will be split in 4 and used by up to 4 shadow maps.
SHADOW_ATLAS_QUADRANT_SUBDIV_16 = 3
This quadrant will be split 16 ways and used by up to 16 shadow maps.
SHADOW_ATLAS_QUADRANT_SUBDIV_64 = 4
This quadrant will be split 64 ways and used by up to 64 shadow maps.
SHADOW_ATLAS_QUADRANT_SUBDIV_256 = 5
This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the positional_shadow_atlas_size is very high, the shadows in this quadrant will be very low resolution.
SHADOW_ATLAS_QUADRANT_SUBDIV_1024 = 6
This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the positional_shadow_atlas_size is very high, the shadows in this quadrant will be very low resolution.
SHADOW_ATLAS_QUADRANT_SUBDIV_MAX = 7
Represents the size of the PositionalShadowAtlasQuadrantSubdiv enum.
SCALING_3D_MODE_BILINEAR = 0
Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using scaling_3d_scale. Values less than 1.0
will result in undersampling while values greater than 1.0
will result in supersampling. A value of 1.0
disables scaling.
SCALING_3D_MODE_FSR = 1
Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using scaling_3d_scale. Values less than 1.0
will be result in the viewport being upscaled using FSR. Values greater than 1.0
are not supported and bilinear downsampling will be used instead. A value of 1.0
disables scaling.
SCALING_3D_MODE_FSR2 = 2
Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using scaling_3d_scale. Values less than 1.0
will be result in the viewport being upscaled using FSR2. Values greater than 1.0
are not supported and bilinear downsampling will be used instead. A value of 1.0
will use FSR2 at native resolution as a TAA solution.
SCALING_3D_MODE_MAX = 3
Represents the size of the Scaling3DMode enum.
MSAA_DISABLED = 0
Multisample antialiasing mode disabled. This is the default value, and is also the fastest setting.
MSAA_2X = 1
Use 2× Multisample Antialiasing. This has a moderate performance cost. It helps reduce aliasing noticeably, but 4× MSAA still looks substantially better.
MSAA_4X = 2
Use 4× Multisample Antialiasing. This has a significant performance cost, and is generally a good compromise between performance and quality.
MSAA_8X = 3
Use 8× Multisample Antialiasing. This has a very high performance cost. The difference between 4× and 8× MSAA may not always be visible in real gameplay conditions. Likely unsupported on low-end and older hardware.
MSAA_MAX = 4
Represents the size of the MSAA enum.
SCREEN_SPACE_AA_DISABLED = 0
Do not perform any antialiasing in the full screen post-process.
SCREEN_SPACE_AA_FXAA = 1
Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K.
SCREEN_SPACE_AA_MAX = 2
Represents the size of the ScreenSpaceAA enum.
RENDER_INFO_OBJECTS_IN_FRAME = 0
Amount of objects in frame.
RENDER_INFO_PRIMITIVES_IN_FRAME = 1
Amount of vertices in frame.
RENDER_INFO_DRAW_CALLS_IN_FRAME = 2
Amount of draw calls in frame.
RENDER_INFO_MAX = 3
Represents the size of the RenderInfo enum.
RENDER_INFO_TYPE_VISIBLE = 0
There is currently no description for this enum. Please help us by contributing one!
RENDER_INFO_TYPE_SHADOW = 1
There is currently no description for this enum. Please help us by contributing one!
RENDER_INFO_TYPE_MAX = 2
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_DISABLED = 0
Objects are displayed normally.
DEBUG_DRAW_UNSHADED = 1
Objects are displayed without light information.
DEBUG_DRAW_LIGHTING = 2
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_OVERDRAW = 3
Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others.
DEBUG_DRAW_WIREFRAME = 4
Objects are displayed in wireframe style.
DEBUG_DRAW_NORMAL_BUFFER = 5
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_VOXEL_GI_ALBEDO = 6
Objects are displayed with only the albedo value from VoxelGIs.
DEBUG_DRAW_VOXEL_GI_LIGHTING = 7
Objects are displayed with only the lighting value from VoxelGIs.
DEBUG_DRAW_VOXEL_GI_EMISSION = 8
Objects are displayed with only the emission color from VoxelGIs.
DEBUG_DRAW_SHADOW_ATLAS = 9
Draws the shadow atlas that stores shadows from OmniLight3Ds and SpotLight3Ds in the upper left quadrant of the Viewport.
DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS = 10
Draws the shadow atlas that stores shadows from DirectionalLight3Ds in the upper left quadrant of the Viewport.
DEBUG_DRAW_SCENE_LUMINANCE = 11
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_SSAO = 12
Draws the screen-space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have Environment.ssao_enabled set in your WorldEnvironment.
DEBUG_DRAW_SSIL = 13
Draws the screen-space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have Environment.ssil_enabled set in your WorldEnvironment.
DEBUG_DRAW_PSSM_SPLITS = 14
Colors each PSSM split for the DirectionalLight3Ds in the scene a different color so you can see where the splits are. In order, they will be colored red, green, blue, and yellow.
DEBUG_DRAW_DECAL_ATLAS = 15
Draws the decal atlas used by Decals and light projector textures in the upper left quadrant of the Viewport.
DEBUG_DRAW_SDFGI = 16
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_SDFGI_PROBES = 17
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_GI_BUFFER = 18
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_DISABLE_LOD = 19
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_CLUSTER_OMNI_LIGHTS = 20
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_CLUSTER_SPOT_LIGHTS = 21
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_CLUSTER_DECALS = 22
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_CLUSTER_REFLECTION_PROBES = 23
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_OCCLUDERS = 24
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_MOTION_VECTORS = 25
There is currently no description for this enum. Please help us by contributing one!
DEBUG_DRAW_INTERNAL_BUFFER = 26
Draws the internal resolution buffer of the scene before post-processing is applied.
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST = 0
The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR = 1
The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS = 2
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true
). This makes the texture look smooth from up close, and smooth from a distance.
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS = 3
The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true
). This makes the texture look pixelated from up close, and smooth from a distance.
DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX = 4
Max value for DefaultCanvasItemTextureFilter enum.
DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED = 0
Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture.
DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED = 1
Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.
DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR = 2
Flip the texture when repeating so that the edge lines up instead of abruptly changing.
DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX = 3
Max value for DefaultCanvasItemTextureRepeat enum.
SDF_OVERSIZE_100_PERCENT = 0
There is currently no description for this enum. Please help us by contributing one!
SDF_OVERSIZE_120_PERCENT = 1
There is currently no description for this enum. Please help us by contributing one!
SDF_OVERSIZE_150_PERCENT = 2
There is currently no description for this enum. Please help us by contributing one!
SDF_OVERSIZE_200_PERCENT = 3
There is currently no description for this enum. Please help us by contributing one!
SDF_OVERSIZE_MAX = 4
There is currently no description for this enum. Please help us by contributing one!
SDF_SCALE_100_PERCENT = 0
There is currently no description for this enum. Please help us by contributing one!
SDF_SCALE_50_PERCENT = 1
There is currently no description for this enum. Please help us by contributing one!
SDF_SCALE_25_PERCENT = 2
There is currently no description for this enum. Please help us by contributing one!
SDF_SCALE_MAX = 3
There is currently no description for this enum. Please help us by contributing one!
VRS_DISABLED = 0
VRS is disabled.
VRS_TEXTURE = 1
VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view.
VRS_XR = 2
VRS texture is supplied by the primary XRInterface.
VRS_MAX = 3
Represents the size of the VRSMode enum.
If true
, the viewport will process 2D audio streams.
If true
, the viewport will process 3D audio streams.
The rendering layers in which this Viewport renders CanvasItem nodes.
Sets the default filter mode used by CanvasItems in this Viewport. See DefaultCanvasItemTextureFilter for options.
Sets the default repeat mode used by CanvasItems in this Viewport. See DefaultCanvasItemTextureRepeat for options.
The canvas transform of the viewport, useful for changing the on-screen positions of all child CanvasItems. This is relative to the global canvas transform of the viewport.
The overlay mode for test rendered geometry in debug purposes.
Disable 3D rendering (but keep 2D rendering).
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
To control this property on the root viewport, set the ProjectSettings.rendering/scaling_3d/fsr_sharpness project setting.
The global canvas transform of the viewport. The canvas transform is relative to this.
If true
, the viewport will not receive input events.
If true
, sub-windows (popups and dialogs) will be embedded inside application window as control-like nodes. If false
, they will appear as separate windows handled by the operating system.
If true
, the GUI controls on the viewport will lay pixel perfectly.
If true
, this viewport will mark incoming input events as handled by itself. If false
, this is instead done by the first parent viewport that is set to handle input locally.
A SubViewportContainer will automatically set this property to false
for the Viewport contained inside of it.
See also set_input_as_handled and is_input_handled.
The automatic LOD bias to use for meshes rendered within the Viewport (this is analogous to ReflectionProbe.mesh_lod_threshold). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to 0.0
, automatic LOD is disabled. Increase mesh_lod_threshold to improve performance at the cost of geometry detail.
To control this property on the root viewport, set the ProjectSettings.rendering/mesh_lod/lod_change/threshold_pixels project setting.
Note: mesh_lod_threshold does not affect GeometryInstance3D visibility ranges (also known as "manual" LOD or hierarchical LOD).
The multisample anti-aliasing mode for 2D/Canvas rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. This has no effect on shader-induced aliasing or texture aliasing.
The multisample anti-aliasing mode for 3D rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d scaling_3d_mode for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing.
If true
, the viewport will use a unique copy of the World3D defined in world_3d.
If true
, the objects rendered by viewport become subjects of mouse picking process.
Note: The number of simultaneously pickable objects is limited to 64 and they are selected in a non-deterministic order, which can be different in each picking process.
If true
, objects receive mouse picking events sorted primarily by their CanvasItem.z_index and secondarily by their position in the scene tree. If false
, the order is undetermined.
Note: This setting is disabled by default because of its potential expensive computational cost.
Note: Sorting happens after selecting the pickable objects. Because of the limitation of 64 simultaneously pickable objects, it is not guaranteed that the object with the highest CanvasItem.z_index receives the picking event.
Use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices.
The subdivision amount of the first quadrant on the shadow atlas.
The subdivision amount of the second quadrant on the shadow atlas.
The subdivision amount of the third quadrant on the shadow atlas.
The subdivision amount of the fourth quadrant on the shadow atlas.
The shadow atlas' resolution (used for omni and spot lights). The value is rounded up to the nearest power of 2.
Note: If this is set to 0
, no positional shadows will be visible at all. This can improve performance significantly on low-end systems by reducing both the CPU and GPU load (as fewer draw calls are needed to draw the scene without shadows).
Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
To control this property on the root viewport, set the ProjectSettings.rendering/scaling_3d/mode project setting.
Scales the 3D render buffer based on the viewport size uses an image filter specified in ProjectSettings.rendering/scaling_3d/mode to scale the output image to the full viewport size. Values lower than 1.0
can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than 1.0
are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also ProjectSettings.rendering/anti_aliasing/quality/msaa_3d for multi-sample antialiasing, which is significantly cheaper but only smooths the edges of polygons.
When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale.
To control this property on the root viewport, set the ProjectSettings.rendering/scaling_3d/scale project setting.
Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
void set_sdf_oversize ( SDFOversize value )
SDFOversize get_sdf_oversize ( )
There is currently no description for this property. Please help us by contributing one!
There is currently no description for this property. Please help us by contributing one!
There is currently no description for this property. Please help us by contributing one!
There is currently no description for this property. Please help us by contributing one!
Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close).
Enabling temporal antialiasing (use_taa) will automatically apply a -0.5
offset to this value, while enabling FXAA (screen_space_aa) will automatically apply a -0.25
offset to this value. If both TAA and FXAA are enabled at the same time, an offset of -0.75
is applied to this value.
Note: If scaling_3d_scale is lower than 1.0
(exclusive), texture_mipmap_bias is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is log2(scaling_3d_scale) + mipmap_bias
.
To control this property on the root viewport, set the ProjectSettings.rendering/textures/default_filters/texture_mipmap_bias project setting.
If true
, the viewport should render its background as transparent.
If true
, uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is not affected by debanding unless the Environment.background_mode is Environment.BG_CANVAS. See also ProjectSettings.rendering/anti_aliasing/quality/use_debanding.
In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.
If true
, 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be a RGBA16
framebuffer, while when using the Mobile renderer it will be a RGB10_A2
framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the 0-1
range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients.
Note: This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons.
If true
, OccluderInstance3D nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, ProjectSettings.rendering/occlusion_culling/use_occlusion_culling must be set to true
instead.
Note: Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (GeometryInstance3D.visibility_range_begin and GeometryInstance3D.visibility_range_end) compared to occlusion culling.
Note: Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with module_raycast_enabled=yes
.
Enables Temporal Anti-Aliasing for this viewport. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion.
Note: The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts.
If true
, the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset.
The Variable Rate Shading (VRS) mode that is used for this viewport. Note, if hardware does not support VRS this property is ignored.
Texture to use when vrs_mode is set to VRS_TEXTURE.
The texture must use a lossless compression format so that colors can be matched precisely. The following VRS densities are mapped to various colors, with brighter colors representing a lower level of shading precision:
The custom World2D which can be used as 2D environment source.
The custom World3D which can be used as 3D environment source.
Returns the first valid World2D for this viewport, searching the world_2d property of itself and any Viewport ancestor.
Returns the first valid World3D for this viewport, searching the world_3d property of itself and any Viewport ancestor.
Returns the currently active 2D camera. Returns null if there are no active cameras.
Returns the currently active 3D camera.
Returns an individual bit on the rendering layer mask.
Returns a list of the visible embedded Windows inside the viewport.
Note: Windows inside other viewports will not be listed.
Returns the transform from the viewport's coordinate system to the embedder's coordinate system.
Returns the mouse's position in this Viewport using the coordinate system of this Viewport.
Returns the positional shadow atlas quadrant subdivision of the specified quadrant.
Returns rendering statistics of the given type. See RenderInfoType and RenderInfo for options.
Returns the transform from the Viewport's coordinates to the screen coordinates of the containing window manager window.
Returns the viewport's texture.
Note: When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. Node._ready. To make sure the texture you get is correct, you can await RenderingServer.frame_post_draw signal.
Returns the viewport's RID from the RenderingServer.
Returns the visible rectangle in global screen coordinates.
Returns the drag data from the GUI, that was previously returned by Control._get_drag_data.
Returns the Control having the focus within this viewport. If no Control has the focus, returns null.
Returns the Control that the mouse is currently hovering over in this viewport. If no Control has the cursor, returns null.
Typically the leaf Control node or deepest level of the subtree which claims hover. This is very useful when used together with Node.is_ancestor_of to find if the mouse is within a control tree.
Returns true
if the drag operation is successful.
Returns true
if the viewport is currently performing a drag operation.
Alternative to Node.NOTIFICATION_DRAG_BEGIN and Node.NOTIFICATION_DRAG_END when you prefer polling the value.
Removes the focus from the currently focused Control within this viewport. If no Control has the focus, does nothing.
Returns whether the current InputEvent has been handled. Input events are not handled until set_input_as_handled has been called during the lifetime of an InputEvent.
This is usually done as part of input handling methods like Node._input, Control._gui_input or others, as well as in corresponding signal handlers.
If handle_input_locally is set to false
, this method will try finding the first parent viewport that is set to handle input locally, and return its value for is_input_handled instead.
Triggers the given event
in this Viewport. This can be used to pass an InputEvent between viewports, or to locally apply inputs that were sent over the network or saved to a file.
If in_local_coords
is false
, the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If in_local_coords
is true
, the event's position is in viewport coordinates.
While this method serves a similar purpose as Input.parse_input_event, it does not remap the specified event
based on project settings like ProjectSettings.input_devices/pointing/emulate_touch_from_mouse.
Calling this method will propagate calls to child nodes for following methods in the given order:
Control._gui_input for Control nodes
If an earlier method marks the input as handled via set_input_as_handled, any later method in this list will not be called.
If none of the methods handle the event and physics_object_picking is true
, the event is used for physics object picking.
Helper method which calls the set_text()
method on the currently focused Control, provided that it is defined (e.g. if the focused Control is Button or LineEdit).
Triggers the given InputEvent in this Viewport. This can be used to pass input events between viewports, or to locally apply inputs that were sent over the network or saved to a file.
If in_local_coords
is false
, the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If in_local_coords
is true
, the event's position is in viewport coordinates.
While this method serves a similar purpose as Input.parse_input_event, it does not remap the specified event
based on project settings like ProjectSettings.input_devices/pointing/emulate_touch_from_mouse.
Calling this method will propagate calls to child nodes for following methods in the given order:
If an earlier method marks the input as handled via set_input_as_handled, any later method in this list will not be called.
If none of the methods handle the event and physics_object_picking is true
, the event is used for physics object picking.
Note: This method doesn't propagate input events to embedded Windows or SubViewports.
Deprecated. Use push_input instead.
Set/clear individual bits on the rendering layer mask. This simplifies editing this Viewport's layers.
Stops the input from propagating further down the SceneTree.
Note: This does not affect the methods in Input, only the way events are propagated.
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
Force instantly updating the display based on the current mouse cursor position. This includes updating the mouse cursor shape and sending necessary Control.mouse_entered, CollisionObject2D.mouse_entered, CollisionObject3D.mouse_entered and Window.mouse_entered signals and their respective mouse_exited
counterparts.
Moves the mouse pointer to the specified position in this Viewport using the coordinate system of this Viewport.
Note: warp_mouse is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.