Skip to content

five-on-it / packages/ai/src/system / NpcRoute

Interface: NpcRoute ​

Defined in: packages/ai/src/system.ts:125

The route a driving NPC follows: a polyline of x, z pairs, how it was found, where it was planned to.

Properties ​

goalX ​

goalX: number

Defined in: packages/ai/src/system.ts:133

The goal the route was made for (m).


goalZ ​

goalZ: number

Defined in: packages/ai/src/system.ts:135

The goal the route was made for (m).


index ​

index: number

Defined in: packages/ai/src/system.ts:131

The segment the car is on.


kind ​

kind: "road" | "grid" | "direct"

Defined in: packages/ai/src/system.ts:127

A clear straight line, the roads' lane centres, or a search over the car's grid.


points ​

points: Float32Array

Defined in: packages/ai/src/system.ts:129

The waypoints, x and z interleaved.