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...
HeightMapShape3D¶
继承: Shape3D < Resource < RefCounted < Object
3D 高度图形状,用于物理碰撞。
描述¶
3D 高度图形状,旨在用于物理。常用于为 CollisionShape3D 提供形状。可用于地形,但是有无法存储悬垂部分(如洞窟)的限制。HeightMapShape3D 中创建洞的方法是为所需区域分配极低的值。
性能:对 HeightMapShape3D 的碰撞检测比 ConcavePolygonShape3D 快,但与 BoxShape3D 等图元形状相比显著要慢。
属性¶
|
||
|
||
|
属性说明¶
PackedFloat32Array map_data = PackedFloat32Array(0, 0, 0, 0)
void set_map_data ( PackedFloat32Array value )
PackedFloat32Array get_map_data ( )
高度图数据,池数组的大小必须是 map_width * map_depth。
int map_depth = 2
高度图深度中的顶点数。更改该项将调整 map_data 的大小。
int map_width = 2
高度图宽度中的顶点数。更改该项将调整 map_data 的大小。