Skip to content

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

Interface: NpcPath ​

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

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:137

Whether the plan reaches the goal (an incomplete one ends nearest to it).


goalX ​

goalX: number

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

The goal the plan was made for (m).


goalZ ​

goalZ: number

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

The goal the plan was made for (m).


index ​

index: number

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

The waypoint headed for.


optional links?: Int32Array<ArrayBufferLike>

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

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:129

The waypoints, x and z interleaved.


unreachable? ​

optional unreachable?: boolean

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

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.