Index

GetExactTerrain

GetExactTerrain(<-posX <-posZ <-includePseudoTerrain) ->exactTerrainHeight

Description

Gets the floating point height of the terrain at the specified floating point position. A value of 0 means “void” or no terrain. The height of terrain varies between integer map positions. This API can be used to determine the exact height at any position on the map. It works by calculating the terrain triangle that the specified point is over, and then returning the exact height of the point on that triangle. This can be useful for positioning units that need to crawl up and over terrain. The final parameter is a boolean that specifies whether to include the invisible pseudo terrain that some units create.

Examples

GetExactTerrain(42.5 23.5 false) ->exactTerrainHeight

Index