How to apply multiple idle animations

I’m trying to make a 2D game with 4 directional movement, where you have 4 idle animations depending on the last direction the character runs in (ie. idle state facing left/right/up/down), as well as running and walking in all of those directions.

left and right directions are easy by just flipping the sprite, but the up and down directions have their own animation sequences.

My question is, is there an easier (or at least more graceful) way to do this other than just creating all the states in the Animator and linking them all up?

Well it’s not that bad with the animator to be honest: create a blend tree with all the four idle animations and use a parameter “lastDirection” as blend factor. You can then store the last directional key pressed before stopping moving and the blend tree will choose the appropriate animation. You could also do it via script, but I doubt it will be more “graceful” than the animator :slight_smile: