Search Unity

Animation playing slower and appears to drop frames, or "smooth out". Stats tool is showing high FPS

Discussion in 'Animation' started by FrickinSilly, Oct 26, 2020.

  1. FrickinSilly

    FrickinSilly

    Joined:
    Feb 19, 2020
    Posts:
    53
    I have a character Punch animation. Naturally I want the punch to be quick. There's a very sharp change in position the character's arm position in the first 5 frames of the animation and then another 35 frames to slowly reel its arm back to the starting position.

    When I play it from the Animation window, it works perfectly. It snaps exactly as I want it to.

    When I play it in game (I use a simple animation trigger when I press a key), its as if all of the keyframes were spread out evenly and the character looks more like it's reaching out and back in slowly.

    In the stats window, the framerate never drops below 150FPS, and this is in a pretty barren test environment, so I doubt the machine is doing any heavy duty lifting.

    The animation itself has all default settings other than unchecking "loop time".

    The animation state has only one transition away from it with Exit time of 0.99 and transition of 0.05.
     
  2. FrickinSilly

    FrickinSilly

    Joined:
    Feb 19, 2020
    Posts:
    53
    Ok, I solved my issue as I was finishing up writing the question. As I was writing the last line of the post, it dawned on me to check the INCOMING transition, which had no exit time, but a transition time of 0.25. That was causing the previous animation to blend with the current animation OVER the quick 5 frame snapping period.

    Changing that value to 0 fixed the issue and my animation snaps again.

    Hopefully this forum is OK with self answering. I could have deleted the question before posting but thought this might help others experiencing the same issue!