Jump to content

GetTerrainHeightFlatness

From CMM Wiki
Revision as of 12:27, 24 June 2026 by Ozdeadmeat (talk | contribs) (GetTerrainHeightFlatness – created via PowerShell script (2026-06-24T22:27:14Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetTerrainHeightFlatness
Function Description: Returns a height difference value
File Location: cmm.positionFunctions.lua
Syntax: CMM.GetTerrainHeightFlatness( table vec3 , number or nil radius , number or nil limit )
Return Value: number or boolean or nil
Parameters: Name Description
vec3Vec3 table with x, y, z coordinates
radiusA number representing the radius in meters around the point to sample terrain heights [DEFAULT: 30]
limitAn optional number representing a maximum acceptable height difference; if provided, the function will return a boolean indicating whether the height difference is within this limit.
Example: CMM.GetTerrainHeightFlatness({x=100, y=50, z=10})
Example Description: Returns the closest point on the road network to the given position, or the original position if no roads are found.
Related Functions:
Notes: