five-on-it / packages/ai/src/steer-foot / planOnFoot
Function: planOnFoot()
planOnFoot(
ai,npc,x,z,goalX,goalZ,goalFeet?):void
Defined in: packages/ai/src/steer-foot.ts:60
Plans the walk to (goalX, goalZ) on the foot layers when the current plan is missing, due, or aimed too far from the goal, and the world's plans for this tick are not spent (a denied plan is asked for again next tick); keeps the current plan otherwise. It starts on the floor the character stands on and ends on the floor goalFeet says (the height of the feet of whoever it goes after), or, without it, the floor of the goal's cell nearest the character's own height: up the stairs only when the goal is up there. A complete plan ends at the goal itself; an incomplete one at the node nearest to it.
Parameters
ai
npc
x
number
z
number
goalX
number
goalZ
number
goalFeet?
number
Returns
void