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...
ArrayOccluder3D
继承: Occluder3D < Resource < RefCounted < Object
用于与 OccluderInstance3D 中的遮挡剔除一起使用的 3D 多边形形状。
描述
ArrayOccluder3D 存储一个任意的 3D 多边形形状,可供引擎的遮挡剔除系统使用。这类似于 ArrayMesh,但适用于遮挡物。
有关设置遮挡剔除的说明,请参阅 OccluderInstance3D 的文档。
教程
属性
|
||
|
方法
void |
set_arrays(vertices: PackedVector3Array, indices: PackedInt32Array) |
属性说明
PackedInt32Array indices = PackedInt32Array()
🔗
void set_indices(value: PackedInt32Array)
PackedInt32Array get_indices()
该遮挡物的索引位置。索引确定 vertices 数组中的哪些点应被绘制,以及以哪种顺序绘制。
注意:该遮挡物总是在设置这个值后更新。如果程序化创建遮挡物,请考虑改用 set_arrays() 来避免在创建时更新遮挡物两次。
Note: The returned array is copied and any changes to it will not update the original property value. See PackedInt32Array for more details.
PackedVector3Array vertices = PackedVector3Array()
🔗
void set_vertices(value: PackedVector3Array)
PackedVector3Array get_vertices()
该遮挡物在局部 3D 坐标中的顶点位置。
注意:该遮挡物总是在设置这个值后更新。如果程序化创建遮挡物,请考虑改用 set_arrays() 来避免在创建时更新遮挡物两次。
Note: The returned array is copied and any changes to it will not update the original property value. See PackedVector3Array for more details.
方法说明
void set_arrays(vertices: PackedVector3Array, indices: PackedInt32Array) 🔗