Search Unity

Question Animation Transition "Glitches"?

Discussion in 'Animation' started by Twisted4000, May 9, 2023.

  1. Twisted4000

    Twisted4000

    Joined:
    Jun 13, 2022
    Posts:
    5
    I'm making a 2D game and have been experiencing what I think are glitches in the animation transitions. I'm still pretty new to Unity so I'm sure I'm just doing something wrong, but if anyone has any pointers, I'd love to hear them!

    I'm simply trying to transition a character's animation from "Idle" to "Crouch", and vice versa. I have the transition set up with triggers. With my code, the transitioning works fine EXCEPT for one problem: immediately before the transition begins (it looks like 1 frame), the animation of the current clip will play its FIRST frame AGAIN. In fact, all of the other animation transitions I have set up do the exact same thing.




    Here is the initial frame of the Crouch animation clip:


    And here is the last frame:


    Whenever I want the character to go back to the "Idle" animation (or any other), the FIRST frame of the Crouch animation plays right before the next clip does.

    And again, for some reason all of my animations do this: when a new clip is triggered, the current clip plays its first frame one more time before the next clip takes over. I do not understand why they're all doing this, and/or if I did anything incorrectly. Any ideas?

    As for a bonus question, I have the game set at 60FPS in Unity, but I'm using 30FPS animation in Toon Boom Harmony. Will this cause any issues? Should I also be animating in 60FPS or does it not matter?

    Thanks!!
     
  2. Twisted4000

    Twisted4000

    Joined:
    Jun 13, 2022
    Posts:
    5