Local Movement (Chapter 2)

The Dynamic Arrive Movement had an error in the slides
When the distance to the target was smaller than the stop radius the algorithm was not returning any movement output.

if(distance < stopRadius) 
       return null

However, the problem with this is that if the character's velocity is not zero when reaching the stopRadius, and given that this is a dynamic movement
and returns accelerations, not returning a movement output means that there is no disacceleration and the character will continue moving with non-zero velocity.

So, we need to return a movement output even for this situation, in order to make sure that the character will disaccelerate towards a target velocity of zero.

the algorithm changes to:
if(distance < stopRadius)
        targetSpeed = 0
else if (distance > slowRadius)
        targetSpeed = maxSpeed
else ...

This change has been updated in the slides for Movement - Part1.