Jump to content

GetClosestPointOnRoads

From CMM Wiki
Revision as of 12:27, 24 June 2026 by Ozdeadmeat (talk | contribs) (GetClosestPointOnRoads – 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: GetClosestPointOnRoads
Function Description: Converts a heading in degrees into a forward Vec3 vector.
File Location: cmm.positionFunctions.lua
Syntax: CMM.GetClosestPointOnRoads( table vec3 )
Return Value: table or nil
Parameters: Name Description
vec3Vec3 table with x, y, z coordinates
Example: CMM.GetClosestPointOnRoads({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: