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

Question Animation Snapping

Discussion in 'Animation' started by madeer, Aug 16, 2020.

  1. madeer


    Aug 2, 2018
    im trying to figure out why my animation is snapping as shown in the video below. This is how im handling most of animations, i can't find a reason for this happening. Furthermore if i spam my Roll button the snapping seems to fix itself and its not happening at all anymore.
    Tank you for any suggestions.

    Code (CSharp):
    1.       public void PlayTargetAnimation(string targetAnim, bool isInteracting)
    2.         {
    3.             anim.applyRootMotion = isInteracting;
    4.             anim.SetBool("isInteracting", isInteracting);
    5.             anim.CrossFade(targetAnim, 0.2f);
    6.         }