Search Unity

How does this happen in an animation transition?

Discussion in 'Animation' started by MasterElement, Jan 20, 2022.

  1. MasterElement

    MasterElement

    Joined:
    Jun 13, 2016
    Posts:
    142
    So I'm making a 2d game and I'm transitioning animations from jumping to idle. However the transition never happens. I went to investigate and found this head scratcher in the transitions inspector.
    https://imgur.com/a/xSK5w6r

    As you can see in the window that shows how the animations line up in the transition the jumping animation isn't there, just the Idle one. This has to be why the transition doesn't happen.
    How does this happen and how do I fixed it?
     
  2. MarekUnity

    MarekUnity

    Unity Technologies

    Joined:
    Jan 6, 2017
    Posts:
    207
    Your transition time is 0 and the Exit Time is 0 as well. This basically means that your PlayerJump should transition instantaneously to PlayerIdle - this is also what you seen in the graph.

    Have you set IsJumping parameter to false? Looking at your screenshot it's the only condition that you have in your transition.
     
  3. MasterElement

    MasterElement

    Joined:
    Jun 13, 2016
    Posts:
    142
    But I have had many animations with 0 transition and exit time and they don't come out like that when I add a condition. Now it's happening in other animator assets and even sometimes doesn't have a graph at all just asks for a condition. I have never seen this in years of fooling around with unity. Is this a glitch? It only seems to happen with short animations like with one frame, or sometimes too.
     
  4. MarekUnity

    MarekUnity

    Unity Technologies

    Joined:
    Jan 6, 2017
    Posts:
    207
    Transition and Exit Time set to 0 should make the transition immediate. Have you tried debugging the animator behavior? Is the bool parameter set correctly?

    I don't think I follow, can you explain it a little bit more?
     
  5. Brant121

    Brant121

    Joined:
    Jan 22, 2022
    Posts:
    1
    I didn't understand it can you explain me in details?