findPath
findPath(
__namedParameters,__namedParameters):Vector3[]
Defined in: packages/engine/src/gameplay/map/navMesh.ts:97
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.
Empty means an end too far off the mesh to snap onto, either end, and that
alone: the query fails outright when it cannot find a polygon for one. Two
ends that snap with no route between them answer a partial path instead -
recast reports success with the corners as far as it got, so the last
corner is the point nearest to only where to can be reached at all.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
NavMeshHandle |
__namedParameters |
PathQuery |
Returns
Section titled “Returns”Vector3[]