move-player-on-heading ( d-left player distance heading -- d-left' player )


Vocabulary
jamshred.player

Inputs
d-leftan object
playeran object
distancean object
headingan object


Outputs
d-left'an object
playeran object


Definition


:: move-player-on-heading
( d-left player distance heading -- d-left' player )
d-left distance min :> d-to-move d-to-move heading n*v
:> move-v move-v player location+
heading player update-nearest-segment2 d-left d-to-move -
player ;