Skip to content

IsReachable

Whether a walk joins two points on the navigation mesh.

The same test as FindPath without the corners - a spawn point that can be walked out of, a goal that can be reached. Bounded the same way: a search past its budget answers false.

IsReachable(x1, y1, z1, x2, y2, z2)
Parameter Type
x1 number the start
y1 number
z1 number
x2 number the end
y2 number
z2 number

boolean - false off the mesh, unreachable, or without a navmesh

if not IsReachable(spawnX, spawnY, spawnZ, goalX, goalY, goalZ) then goal = pickAnother() end

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