Skip to content

NavSurface

Defined in: ai/nav/NavSurface.ts:55

The active navigable world, however it was built.

readonly up: Vec3

Defined in: ai/nav/NavSurface.ts:62

Which way is OFF the ground here — the direction anything drawn ON this surface is lifted along so it does not fight the floor for pixels. A flat grid’s is +Z, toward the viewer of a scene laid out in x/y; a spatial mesh’s is +Y, out of the ground it follows.

describe(sink): void

Defined in: ai/nav/NavSurface.ts:80

Hand the shape of the walkable world to a drawer.

NavSurfaceSink

void


findWorldPath(from, to, opts?): Vec3[] | null

Defined in: ai/nav/NavSurface.ts:70

Plan a world-space route between two world points, or null when there is no way. The waypoints carry all three axes: on a flat surface the third is the plane the scene is drawn on, on a spatial one it is the ground the route walks over.

NavPoint

NavPoint

NavQueryOptions

Vec3[] | null


isNavigable(p): boolean

Defined in: ai/nav/NavSurface.ts:77

Whether an agent may stand at a world point. Asked of a place the agent has not been routed to — a step sideways to get round another body — which is why it is not the same question as “is there a route here”.

NavPoint

boolean