New here... Need help with the order of animations!

Hey guys so I am working on my first Unity project and I’m having some trouble getting the animations to act in the correct order. Here is how my animations stand:

The problem I am having is: if I am in “AttackStanceWalk” and I attack, the “big swing” or “backSwing” animation will play and after the animation is through, even if I am still moving, the “FightingIdle” animation will play for a slight second and then go back to “AttackStanceWalk”. The intended result would be that if you are still moving after the swing animations are done, the base should go straight to “AttackStanceWalk”, instead of flashing the “fightingIdle”. How could I get the intended result please?

I should also mention this is a 2D project, although I’m not sure how much of a difference that makes.

Check the transitions from BackSwing/BigSwing to FightingIdle and AttackStanceWalk. Try to make them mutually exclusive so that only one transition will be true.

This depends on the parameters you’ve defined. For example, let’s say you’re in AttackStanceWalk when the Boolean parameter Armed is true and Speed is greater than 0.1.

From BackSwing, your 2 transitions might be:

  • BackSwing → AttackStanceWalk: Speed Greater Than 0.1
  • BackSwing → FightingIdle: Speed Less Than 0.1

Technically, if both transitions are true, the animator will follow the top one in the list. But it’s more clear if they’re mutually exclusive so that only one can be true at a time.

1 Like

Thank you very much friend! I will give it a try.

For future reference: this was the correct solution and proper explanation… A million thanks!

Thank you TonyLi. Your solution worked.

Happy to help!