five-on-it / packages/ai/src/system / NpcRoute
Interface: NpcRoute
Defined in: packages/ai/src/system.ts:152
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:160
The goal the route was made for (m).
goalZ
goalZ:
number
Defined in: packages/ai/src/system.ts:162
The goal the route was made for (m).
index
index:
number
Defined in: packages/ai/src/system.ts:158
The segment the car is on.
kind
kind:
"road"|"grid"|"direct"
Defined in: packages/ai/src/system.ts:154
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:156
The waypoints, x and z interleaved.