Table of Contents

Class GLTFCamera

Represents a glTF camera.

Inheritance
GLTFCamera

Remarks

Represents a camera as defined by the base glTF spec.

See Also

Properties

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.

var depth_far : float = 4000.0

Property Value

float

Remarks

  • void set_depth_far(float value)
  • float get_depth_far

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.

var depth_near : float = 0.05

Property Value

float

Remarks

  • void set_depth_near(float value)
  • float get_depth_near

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.

var fov : float = 1.309

Property Value

float

Remarks

perspective

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 projection and the glTF spec for more information.

var perspective : bool = true

Property Value

bool

Remarks

  • void set_perspective(bool value)
  • bool get_perspective

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.

var size_mag : float = 0.5

Property Value

float

Remarks

  • void set_size_mag(float value)
  • float get_size_mag

Methods

from_dictionary(Dictionary)

Qualifiers: static

Creates a new GLTFCamera instance by parsing the given Dictionary.

GLTFCamera from_dictionary(Dictionary dictionary)

Parameters

dictionary Dictionary

from_node(Camera3D)

Qualifiers: static

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

GLTFCamera from_node(Camera3D camera_node)

Parameters

camera_node Camera3D

to_dictionary

Qualifiers: const

Serializes this GLTFCamera instance into a Dictionary.

Dictionary to_dictionary

to_node

Qualifiers: const

Converts this GLTFCamera instance into a Godot Camera3D node.

Camera3D to_node