Search Unity

Unity 2021.3.0 LTS has weird animation bug with Blend Tree

Discussion in 'Animation' started by metaphysician, Jul 2, 2022.

  1. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    190
    hi folks - movement in my game when running or walking has been jerky, but i attributed it to bad animation. however i recently spent time checking out the animation and player controller in a blank scene and the animations, while not perfect, are fine when played by themselves.

    when put into a Blend Tree however, they are somehow speeding up the last bit of the animation (run and walk). if the animation uses root motion, it results in the character sliding back instead of moving forward constantly.

    this is happening even with no other animations in the blend tree. however, if i just use an ordinary state the animation plays smoothly. i did a test screencap in gameplay while previewing the animation in the Inspector. you can clearly see the foot slide quickly at the end of the loop compared to the preview animation:

    https://www.dropbox.com/s/tj7p8p206mnuh2x/Unity2021.3-AnimationTest.mp4?dl=0

    what the heck is going on here? it's autoplaying the animation without root motion and the slippage is clearly happening. is it a bug with the early 2021.3 LTS version? (i have 2021.3.0f1 installed). i'm totally flummoxed how to deal with this. i checked the forward parameter i'm using for the blend tree and it doesn't glitch upward in speed either. it feels like a bug, but i'm open to other interpretations. i'm going to open this in other Unity versions and see if it behaves the same. any assistance appreciated!
     
  2. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    190
    allright - looks like a buggy animation controller or more precisely a buggy blend tree? in my demo i took the existing blend tree down to one element but i did not delete it. after deleting the blend tree grounded state and starting over, the animations there look smoother. possible that maybe it was briefly transitioning to other states on every loop but i can't tell for certain. anyway, looks mostly solved at the moment.