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.

HeightMapShape3D

Inherits: Shape3D < Resource < RefCounted < Object

A 3D height map shape used for physics collision.

描述

A 3D heightmap shape, intended for use in physics. Usually used to provide a shape for a CollisionShape3D. This is useful for terrain, but it is limited as overhangs (such as caves) cannot be stored. Holes in a HeightMapShape3D are created by assigning very low values to points in the desired area.

Performance: HeightMapShape3D is faster to check collisions against than ConcavePolygonShape3D, but it is significantly slower than primitive shapes like BoxShape3D.

属性

PackedFloat32Array

map_data

PackedFloat32Array(0, 0, 0, 0)

int

map_depth

2

int

map_width

2


Property Descriptions

PackedFloat32Array map_data = PackedFloat32Array(0, 0, 0, 0)

Height map data, pool array must be of map_width * map_depth size.


int map_depth = 2

  • void set_map_depth ( int value )

  • int get_map_depth ( )

Number of vertices in the depth of the height map. Changing this will resize the map_data.


int map_width = 2

  • void set_map_width ( int value )

  • int get_map_width ( )

Number of vertices in the width of the height map. Changing this will resize the map_data.