TerrainHeight()

Syntax

Height = TerrainHeight(x, z)
Description
Returns the height value at the specified position in the terrain. The origin for terrain coordinates is (0,0) and is located at the top/left of the 2D picture. This command is mainly used to handle collision with the ground.

Parameters

x - The horizontal position of the point from which to read the height

z - The depth of the point from which to read the height

Return value

Height - The height value at the specified position of the terrain.

Supported OS

Windows, Linux

<- CreateTerrain() - Terrain Index