If this is the current camera, remove it from being current. If enable_next is true, request to make the next camera current, if any.
Returns the camera's RID from the VisualServer.
Gets the camera transform. Subclassed cameras such as InterpolatedCamera may provide different transforms than the Node transform.
Returns true if the given layer in the cullMask is enabled, false otherwise.
Returns the camera's frustum planes in world space units as an array of Planes in the following order: near, far, left, top, right, bottom. Not to be confused with frustumOffset.
Returns true if the given position is behind the camera. Note: A position which returns false may still be outside the camera's field of view.
Makes this camera the current camera for the Viewport (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added.
Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc.
Returns the 3D point in world space that maps to the given 2D coordinate in the Viewport rectangle on a plane that is the given z_depth distance into the scene away from the camera.
Returns a normal vector in world space, that is the result of projecting a point on the Viewport rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
Returns a 3D position in world space, that is the result of projecting a point on the Viewport rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking.
Enables or disables the given layer in the cullMask.
Sets the camera projection to frustum mode (see constant PROJECTION_FRUSTUM), by specifying a size, an offset, and the z_near and z_far clip planes in world space units.
Sets the camera projection to orthogonal mode (see constant PROJECTION_ORTHOGONAL), by specifying a size, and the z_near and z_far clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.)
Sets the camera projection to perspective mode (see constant PROJECTION_PERSPECTIVE), by specifying a fov (field of view) angle in degrees, and the z_near and z_far clip planes in world space units.
Returns the 2D coordinate in the Viewport rectangle that maps to the given 3D point in world space. Note: When using this to position GUI elements over a 3D viewport, use isPositionBehind to prevent them from appearing if the 3D point is behind the camera:
The culling mask that describes which 3D render layers are rendered by this camera.
If true, the ancestor Viewport is currently using this camera.
If not constant DOPPLER_TRACKING_DISABLED, this camera will simulate the url=https://en.wikipedia.org/wiki/Doppler_effectDoppler effect/url for objects changed in particular _process methods. See dopplertracking for possible values.
The Environment to use for this camera.
The distance to the far culling boundary for this camera relative to its local Z axis.
The camera's field of view angle (in degrees). Only applicable in perspective mode. Since keepAspect locks one axis, fov sets the other axis' field of view angle. For reference, the default vertical field of view value (70.0) is equivalent to a horizontal FOV of: - ~86.07 degrees in a 4:3 viewport - ~96.50 degrees in a 16:10 viewport - ~102.45 degrees in a 16:9 viewport - ~117.06 degrees in a 21:9 viewport
The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as url=https://zdoom.org/wiki/Y-shearingY-shearing/url.
The horizontal (X) offset of the camera viewport.
The distance to the near culling boundary for this camera relative to its local Z axis.
The camera's projection mode. In constant PROJECTION_PERSPECTIVE mode, objects' Z distance from the camera's local space scales their perceived size.
The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since keepAspect locks on axis, size sets the other axis' size length.
The vertical (Y) offset of the camera viewport.
Construct a new instance of Camera. Note: use memnew!Camera instead.
Camera node, displays from a point of view.
Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest Viewport node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a Viewport, and, without one, a scene registered in that Viewport (or higher viewports) can't be displayed.