Terrain Physics Heightfield Collider Component

The Terrain Physics Heightfield Collider component provides terrain data to the physics system in the form of a heightfield and material assignments. You can configure the dimensions of the collider by modifying the Axis Aligned Box Shape component on the same entity.


You can assign which materials are assigned to surfaces, by selecting a surface type in the surface pull down menu, then selecting a physics material type in the material pull down.


Terrain Gem


Axis Aligned Box Shape


Terrain Physics Heightfield Collider component properties

Surface to Material MappingsAn array of surface tags and physics materials to map together.
Surface TagSelects a surface tag to map to a phsyics material.Surface: Surface TagNone
Material IDSelects a physics material to apply to the surface.Material: Physics MaterialNone


Use the following request functions with the HeightfieldProviderRequestsBus EBus interface to communicate with Terrain Physics Heightfield Collider components of your game.

Request NameDescriptionParameterReturnScriptable
GetHeightfieldGridSpacingReturns the resolution of the heightfield.NoneResolution: Vector2No
GetHeightfieldGridSizeReturns the size of the heightfield in the form of a row and column count.NoneRow Count: Integer; Column Count: IntegerNo
GetMaterialListReturns an array of surfaces used by this component.NoneArray of Physics Materials Indexes: INo
GetHeightsReturns the heightfield as an array of float values.NoneArray of Heights: FloatNo
GetHeightsAndMaterialsReturns an array of the heights in the heightfield, together with the physics material index for each point.NoneArray of Heights: Float, Physics Material Indexes: IntegerNo
UpdateHeightsReturns a subsection of the heightfield array within specific bounds.Bounds: AabbArray of Heights: FloatNo