Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

2D Animation State Stuck - Wont Transition Correctly

Discussion in 'Animation' started by DanielRiches, Nov 25, 2019.

  1. DanielRiches

    DanielRiches

    Joined:
    Nov 23, 2019
    Posts:
    167
    Hi all, I cant code but am starting to learn unity to make my first game using scripts and such, and I have a problem with animation transitions.

    I currently have the transitions set up as below



    My problem is, once I make him crouchwalk and stop moving he then transitions to crouching (this is as intended) but after that, once I release the crouch button he does not go back to Idle, In fact, starting from Idle once I crouch he seems to get stuck in the crouch animation altogether playing at double speed unless I move in a direction or Jump (which would activate Run , Jump or Crouchwalk), like the crouch element just keeps looping back to itself, even though I have the transition set up as below:

    Crouch = False
    Speed Less 0.01

    It's worth noting that I havent even started his crawl animation for Crouchwalk so I used his run animation at half speed, im guessing this shouldnt effect the problem as it's the transitions that arent working


    From what im seeing it should work, argh!

    Any help would be appreciated, thanks in advance!

    EDIT: I just made some fresh PixelArt and gave him a crouch to crawling animation, it looks better now but him getting stuck on crouch is still a problem, he just doesnt transition back to idle when i release the crouch key...
     
    Last edited: Nov 25, 2019