Hi all.
I have a 2D platformer with two movement speeds - walk and run. Walk is 300 max speed, run is 600 max speed.
The player holds L to run.
I'm using the code below. The problem is that as soon as they stop running (letting go of L), they immediately drop to the walking speed of 300, and it's a jarring difference.
How might I make the speed drop from 600 to 300 over the course of a second, rather than immediately please?