User Tools

Site Tools


4rpl:commands:getexactterrain

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

4rpl/commands/getexactterrain.txt · Last modified: 2021/05/20 23:25 by Argonwolf