five-on-it / packages/ai/src/steer-foot / stuckControl
Function: stuckControl()
stuckControl(
ai,npc,wantsToMove,speed,dx,dz,x,z):object
Defined in: packages/ai/src/steer-foot.ts:186
Notices a character that wants to move but does not, and gets it going again: a sidestep (the other way each time), a jump when it happens again soon, and a new plan around the spot when it happens a third time. Returns the heading to take.
Parameters
ai
npc
wantsToMove
boolean
speed
number
dx
number
dz
number
x
number
z
number
Returns
object
dx
dx:
number
dz
dz:
number
jump
jump:
boolean