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.

ArrayOccluder3D

繼承: Occluder3D < Resource < RefCounted < Object

用於 OccluderInstance3D 遮擋剔除的 3D 多邊形形狀。

說明

ArrayOccluder3D 儲存可供引擎遮擋剔除系統使用的任意 3D 多邊形形狀,概念上類似於 ArrayMesh,但專用於遮擋物。

設定方法請參閱 OccluderInstance3D 文件。

教學

屬性

PackedInt32Array

indices

PackedInt32Array()

PackedVector3Array

vertices

PackedVector3Array()

方法

void

set_arrays(vertices: PackedVector3Array, indices: PackedInt32Array)


屬性說明

PackedInt32Array indices = PackedInt32Array() 🔗

遮擋物的索引位置。索引決定應從 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() 🔗

遮擋物在本地 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) 🔗

同時設定 indicesvertices,並於兩者皆完成後僅更新一次最終遮擋物。