Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GLTFCamera
繼承: Resource < RefCounted < Object
代表 glTF 相機。
說明
代表基礎 glTF 規格中定義的相機。
教學
屬性
|
||
|
||
|
||
|
||
|
方法
from_dictionary(dictionary: Dictionary) static |
|
to_dictionary() const |
|
to_node() const |
屬性說明
該相機與遠剔除邊界的距離,相對於其區域 Z 軸,單位為米。映射到 glTF 的 zfar 屬性。
該相機與近剔除邊界的距離,相對於其區域 Z 軸,單位為米。映射到 glTF 的 znear 屬性。
該相機的 FOV。這個類和 glTF 在定義相機 FOV 時使用的都是弧度,但 Godot 使用的是度。映射到 glTF 的 yfov 屬性。只在透視相機中使用,即 perspective 為 true 時。
如果為 true,則相機處於透視模式。否則相機處於正交模式。映射到 glTF 的相機 type 屬性。詳見 Camera3D.projection 及 glTF 規格。
該相機的大小。這個類和 glTF 在定義相機大小尺度時使用的都是半徑的米數,但 Godot 使用的是直徑的米數。映射到 glTF 的 ymag 屬性。只在正交相機中使用,即 perspective 為 false 時。
方法說明
GLTFCamera from_dictionary(dictionary: Dictionary) static 🔗
通過解析給定的 Dictionary 新建 GLTFCamera 實例。
GLTFCamera from_node(camera_node: Camera3D) static 🔗
從給定的 Godot Camera3D 節點新建 GLTFCamera 實例。
Dictionary to_dictionary() const 🔗
將這個 GLTFCamera 實例序列化為 Dictionary。
將這個 GLTFCamera 實例轉換為 Godot Camera3D 節點。