Running + coming to stop animation

My player can run. When it is running, a running animation is played. When I stop running, I want it to play a “braking” or “slowing down” animation before the player comes to an idle animation.
How can I do this?
Do I have to create 3 different states in the animator (run, slow down and idle) ?
Or can i somehow implement a run animation that contains both the running animation and the slow down animation?

Look into blendspaces or blendtree. You can send the animator your character’s velocity or inputs, and that can determine which animation to play. This can be a selection between distinct states, or if your character is animated with a skeleton rig using the animator, you can smoothly blend between the animations.

Here’s an example:

1 Like