Smoothly transition from max speeds? (Platformer extension)

I’m trying to implement a more smooth sprint mechanic. Where the player just holds a button to run faster, lets go to slow down.

But changing MaxSpeed to do so results in the player just kinda abruptly slowing down, instead of gradually returning to walking speed. What can I do here?

You could add the tween behaviour to your player and use an object variable to set your speed.

So instead of setting the speed to your value straight away, you can tween the variable so it does it gradually over whatever period of time you specify.


Doesn’t work quite as well as I’d like, but it’ll have to do. Thanks!