Fix for regression of Jerky Movements bug

I’m not the first to report that as of the end of this section the player avatar jerks and spins near its destination like it did before the introduction of walkMoveStopRadius.

The code now uses walkMoveStopRadius to show a gizmo where the player will stop when a target point is clicked, but no longer uses it to provide a margin for the animation to complete rootmotion when it gets there.
To fix this, change the if() condition in PlayerMovement.WalkToDestination as follows:

  private void WalkToDestination() { 
    var playerToClickPoint = currentDestination - transform.position; 
    if (playerToClickPoint.magnitude >= 0) { // Replace 0 with walkMoveStopRadius
       thirdPersonCharacter.Move(playerToClickPoint, false, false); 
    thirdPersonCharacter.Move(, false, false);

Now walkMoveStopRadius can be set to stop the jerking and spinning with the side effect that the player could stop up to twice the distance from the clickPoint as that value.

walkMoveStopRadius = 0.3 is the smallest number that works for me. There are other possible fixes without this compromise, but good enough for now.


I’ve posted a “fix” here

1 Like

Privacy & Terms