Version:

Terrain Height Gradient List Component

The Terrain Height Gradient List provides height data for the terrain system from a list of one or more gradients. The range of heights is adjusted by scaling the height of the Axis Aligned Box Shape component on the same entity.

The Terrain Layer Spawner that exists on the same Entity will query the Terrain Height Gradient List via the TerrainAreaHeightRequestBus. If the list contains multiple gradients, the highest point per position queried will be used from each gradient.

Provider

Terrain Gem

Dependencies

Axis Aligned Box Shape

Terrain Layer Spawner

Terrain Height Gradient List properties

Terrain Height Gradient List component properties

PropertyDescriptionValuesDefault
Gradient EntitiesAn array of entities with a Gradient component.Array: EntityIdNone

TerrainAreaHeightRequestBus

Use the following request functions with the TerrainAreaHeightRequestBus EBus interface to communicate with Terrain Height Gradient List components of your game.

Request NameDescriptionParameterReturnScriptable
GetHeightReturns a Vector3 of the Query Position with the Z-value updated to the terrain’s height at the query position. Also returns a boolean value indicating if terrain exists at the Query Position.Query Position: Vector3Terrain Height: Vector3, Terrain Exists: BooleanNo
GetHeightsTakes in a list of Vector3s as input and returns the Vector3s with Z-value updated to the terrain’s height at the query position. Also updates the list of boolean values indicating if terrain exists at each Query Position.Query Positions: List of Vector3Terrain Height: List of Vector3, Terrain Exists: List of BooleanNo