Class reference

GLTFCamera

Inherits Resource

Represents a glTF camera.

Description

Represents a camera as defined by the base glTF spec.

Properties

float depth_far = 4000.0

The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's zfar property.

float depth_near = 0.05

The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's znear property.

float fov = 1.3089969

The FOV of the camera. This class and glTF define the camera FOV in radians, while Redot uses degrees. This maps to glTF's yfov property. This value is only used for perspective cameras, when perspective is true.

bool perspective = true

If true, the camera is in perspective mode. Otherwise, the camera is in orthographic/orthogonal mode. This maps to glTF's camera type property. See Camera3D.projection and the glTF spec for more information.

float size_mag = 0.5

The size of the camera. This class and glTF define the camera size magnitude as a radius in meters, while Redot defines it as a diameter in meters. This maps to glTF's ymag property. This value is only used for orthographic/orthogonal cameras, when perspective is false.

Methods

Camera3D to_node() const

Converts this GLTFCamera instance into a Redot Camera3D node.

Tutorials

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.