GLTFCamera

Inherits: Resource < RefCounted < Object

Represents a GLTF camera.

Description

Represents a camera as defined by the base GLTF spec.

Tutorials

Properties

float

depth_far

4000.0

float

depth_near

0.05

float

fov

1.309

bool

perspective

true

float

size_mag

0.5

Methods

GLTFCamera

from_dictionary ( Dictionary dictionary ) static

GLTFCamera

from_node ( Camera3D camera_node ) static

Dictionary

to_dictionary ( ) const

Camera3D

to_node ( ) const

Property Descriptions

Default

4000.0

Setter

set_depth_far(value)

Getter

get_depth_far()

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.


Default

0.05

Setter

set_depth_near(value)

Getter

get_depth_near()

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.


Default

1.309

Setter

set_fov(value)

Getter

get_fov()

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


Default

true

Setter

set_perspective(value)

Getter

get_perspective()

Whether or not the camera is in perspective mode. If false, 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.


Default

0.5

Setter

set_size_mag(value)

Getter

get_size_mag()

The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot 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.

Method Descriptions

Creates a new GLTFCamera instance by parsing the given Dictionary.


Create a new GLTFCamera instance from the given Godot Camera3D node.


Serializes this GLTFCamera instance into a Dictionary.


Converts this GLTFCamera instance into a Godot Camera3D node.