five-on-it / packages/ai/src/system / NpcPath
Interface: NpcPath
Defined in: packages/ai/src/system.ts:122
The path an NPC follows: waypoints as x, z pairs, the one it heads for, where it was planned to.
Properties
complete
complete:
boolean
Defined in: packages/ai/src/system.ts:132
Whether the plan reaches the goal (an incomplete one ends nearest to it).
goalX
goalX:
number
Defined in: packages/ai/src/system.ts:128
The goal the plan was made for (m).
goalZ
goalZ:
number
Defined in: packages/ai/src/system.ts:130
The goal the plan was made for (m).
index
index:
number
Defined in: packages/ai/src/system.ts:126
The waypoint headed for.
links?
optionallinks?:Int32Array<ArrayBufferLike>
Defined in: packages/ai/src/system.ts:137
The link each waypoint is reached by from the one before (an index into the navigation's links, −1 for a walk), when the path takes any: up a ladder, onto a lift (steer-climb.ts).
points
points:
Float32Array
Defined in: packages/ai/src/system.ts:124
The waypoints, x and z interleaved.
unreachable?
optionalunreachable?:boolean
Defined in: packages/ai/src/system.ts:143
Whether the goal's floor cannot be reached at all (a roof with no way up): the path goes to the nearest way down from it instead (a ladder's foot, a lift's door, where a drop off it lands), or nowhere, and the walk stands at its end. Found without a search.