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 时。
该相机是否处于透视模式。如果为 false,则该相机处于正交模式。映射到 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 节点。