Search Unity

Question Transition priority in animator not working as expected

Discussion in 'Animation' started by Cell-i-Zenit, Jul 27, 2022.

  1. Cell-i-Zenit

    Cell-i-Zenit

    Joined:
    Mar 11, 2016
    Posts:
    290
    Hi,

    below is my current animator.

    The flow is like this:

    1. MovementBlendTree
    2: Press LeftClick to go to LeftAttack (via Trigger)
    3:
    __3a: Press E to move to "AttackTopRight"
    __3b: Do nothing and it will go back to MovementBlendTree
    4:
    __4a: Press Left click to go from "AttackTopRight" to "LeftAttack2".
    __4b: Do nothing and it will go from AttackTopRight to "MovementBlendTree".

    So basically i want to have 3 Animations playing back to back, but only if the player is entering the correct key press. If they dont do this, then they will go back to the beginning.

    My problem is that 4b is ALWAYS! playing, even if the trigger of 4a is activated or both 4a and 4b have "has exit time" activated and no triggers. 4b is always playing...

    When i click on "AttackTopRight" state i can even order the transitions, but it doesnt matter, 4b will always play...

    EDIT: if i mute 4b, then it works exactly as expected, so this means my condition is correctly met, but unity just prefers to go 4b anyway...
     

    Attached Files:

    Last edited: Jul 27, 2022