Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

findPath

findPath(navMeshHandle, pathQuery): WalkToResult

The corners of a straight path from from toward to.

An end standing over a polygon comes back as it was passed in, height and all: recast snaps it only to find that polygon and then pulls its string through the position given, so a query a metre in the air answers corners a metre in the air. An end with no polygon under it - past the border the bake erodes, or over an obstacle - comes back moved onto the nearest one instead. Either way a walker takes its height from the ground rather than from a corner.

An end too far off the mesh to snap onto is refused, naming which end. Two ends that snap with no route between them answer a partial route instead: recast reports success with the corners as far as it got, the point nearest to its search reached, and partial says so.

Parameter Type
navMeshHandle NavMeshHandle
pathQuery PathQuery

WalkToResult