Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0
. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please open an issue.
HeightMapShape3D¶
Inherits: Shape3D < Resource < RefCounted < Object
Height map shape resource for 3D physics.
Description¶
Height map shape resource, which can be added to a PhysicsBody3D or Area3D. Heightmap collision is typically used for colliding with terrains. However, since heightmaps cannot store overhangs, collisions with other structures (such as buildings) must be done with other collision shapes such as ConcavePolygonShape3D. If needed, "holes" can be created in an HeightMapShape3D by assigning very low points (like -100000
) in the desired area.
Performance: HeightMapShape3D is faster to check collisions against compared to ConcavePolygonShape3D, but it is slower than primitive collision shapes such as SphereShape3D or BoxShape3D.
Properties¶
|
||
|
||
|
Property Descriptions¶
PackedFloat32Array map_data = PackedFloat32Array(0, 0, 0, 0)
void set_map_data ( PackedFloat32Array value )
PackedFloat32Array get_map_data ( )
Height map data, pool array must be of map_width * map_depth size.
int map_depth = 2
Number of vertices in the depth of the height map. Changing this will resize the map_data.
int map_width = 2
Number of vertices in the width of the height map. Changing this will resize the map_data.