Class GltfCamera
- Namespace
- Godot
- Assembly
- GodotSharp.dll
Represents a camera as defined by the base GLTF spec.
[GodotClassName("GLTFCamera")]
public class GltfCamera : Resource, IDisposable
- Inheritance
-
GltfCamera
- Implements
- Inherited Members
Constructors
GltfCamera()
public GltfCamera()
Properties
DepthFar
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.
public float DepthFar { get; set; }
Property Value
DepthNear
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.
public float DepthNear { get; set; }
Property Value
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.
public float Fov { get; set; }
Property Value
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 Projection and the GLTF spec for more information.
public bool Perspective { get; set; }
Property Value
SizeMag
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.
public float SizeMag { get; set; }
Property Value
Methods
FromDictionary(Dictionary)
Creates a new GLTFCamera instance by parsing the given Dictionary.
public static GltfCamera FromDictionary(Dictionary dictionary)
Parameters
dictionary
Dictionary
Returns
FromNode(Camera3D)
Create a new GLTFCamera instance from the given Godot Camera3D node.
public static GltfCamera FromNode(Camera3D cameraNode)
Parameters
cameraNode
Camera3D
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
ToDictionary()
Serializes this GLTFCamera instance into a Dictionary.
public Dictionary ToDictionary()
Returns
ToNode()
Converts this GLTFCamera instance into a Godot Camera3D node.
public Camera3D ToNode()