Skip to content

NearestNavmeshPoint

The nearest point on the navigation mesh.

Where to put a spawn, a prop or an actor so that it stands on walkable ground: the point on the mesh nearest the one given, within 2 m sideways and 4 m up or down; nil when the mesh is farther, or without a navmesh.

NearestNavmeshPoint(x, y, z)
Parameter Type
x number metres
y number metres
z number metres

x, y, z - the point on the mesh; nil when none is that close

local x, y, z = NearestNavmeshPoint(gx, gy, gz)
if x then MoveActor(guard, x, y, z, 1.5) end

GetNavmeshHeight · FindPath · the The world - clock, weather, terrain, the navmesh, the geometry group of the index