Search Unity

Question "Has Exit Time" & Transition warning message

Discussion in 'Animation' started by CorkyT, Oct 13, 2022.

  1. CorkyT

    CorkyT

    Joined:
    Aug 21, 2022
    Posts:
    9
    My setup is fairly typical. I have a simple Idle -> Walk controller which uses Mixamo animations. I have unchecked "Has Exit Time" for the Any State transition, and I'm getting a "Transition needs at least one condition or an Exit Time to be valid, otherwise it will be ignored." warning. I assume this means that Unity recommends I have this set.

    However, the character walks smoothly with this setup, meaning, the rightward movement of the screen has 0 hitching.



    If I check "Has Exit Time", then there is hitching, meaning, the rightward movement of the screen stutters slightly ever time the Walk animation has completed.



    Any idea what I could be doing wrong?
     
  2. iLinaza

    iLinaza

    Joined:
    Feb 23, 2019
    Posts:
    23
    Hi,

    I think that, to be able to see what could be causing your problem, you would need you to share how is your Animators graph.

    In any case, if I would have to guess what could be the problem, I would say you don't have a proper condition in you transition out of the Walking state.

    The error you Unity shows when you uncheck "Has Exit Time" means you don't have any conditions set in you exiting transition, so you animator state is probably exiting that state into the next one right away. I think you need to check your exiting condition out of you Walking animation state, which should be the opposite as the transition from Idle to Walking.
     
  3. CorkyT

    CorkyT

    Joined:
    Aug 21, 2022
    Posts:
    9
    Thanks for responding. Is this information helpful? I'm using a speed parameter to control which state of the Blend Tree should be animating.

    upload_2022-10-13_10-36-14.png

    upload_2022-10-13_10-36-38.png
     
  4. iLinaza

    iLinaza

    Joined:
    Feb 23, 2019
    Posts:
    23
    I think you should remove the transition between "Any State" and "Movement". I think it may be causing your "Movement" state to be restarting endlessly and causing the hitching. Click con the arrow between them and just hit "Delete".

    Since "Movement" is the only state you have, and it's the start state, your Animator will automatically enter that state. Try if this fixes your problem.
     
    ilmario likes this.
  5. CorkyT

    CorkyT

    Joined:
    Aug 21, 2022
    Posts:
    9
    That did, thank you!