Search Unity

2D animations not working properly

Discussion in '2D' started by Chucklepie, Mar 23, 2017.

  1. Chucklepie

    Chucklepie

    Joined:
    Feb 22, 2015
    Posts:
    11
    Hello,
    I just cannot get my animations to work :(

    I have a very simple solution of a walking animation which is a loop and three non looped animations - die, hit, blowup. Walk triggers all three and I've coded a simple scene to show them. Hit goes back to walk and die/blowup go to exit

    According to what I've read, I've set the transition to exit as a 'has exit time' because I believe this is meant to tell it to wait until the animation finished.

    However, my problem is no matter what setting I do, the exit state always seems to trigger before my animation has fully completed. If I remove the transition to exit it's fine, but obviously does not go back to the start. When I look in the 'exit time' for the transition to exit it's something daft like 0.006 for one and 0.7 for another. The first is far too short and the second is just too short.

    I've also tried going back from one animation to walk again but the same thing happens, and if I change the transition to have 'has exit time' unticked it never changes back.

    What can I do?
     
    Last edited: Mar 23, 2017
  2. Chucklepie

    Chucklepie

    Joined:
    Feb 22, 2015
    Posts:
    11
    I think I got it working by setting the exit times to zero. But why did it automatically add these times,which I believe are somehow linked to length of the animation? i.e. effectively not showing the animation.

    I've tried reading the online manual, but I find it more like an automated javadoc than a proper guide with details without explanations.