Index

GetPointerTerrainCoords

GetPointerTerrainCoords ->cellZ ->cellX

Description

Gets the map cell coordinates current pointed at by the game pointer (the mouse). A ray projection is done from the pointer through the 3D world and a collision is checked at each terrain height level. So this API will return the location on the map surface that the pointer is pointing towards.

:NOTE: The returned coordinates are floats, not integers. If you wish to use this API to obtain cell coordinates rather than world-space, use the Ceil operator to round into an integer.
This API also works outside the map boundaries.

Examples

ShowTerrainRangeIndicator(GetPointerTerrainCoords 10 false)

Index