- Home /
Animation blend tree value glitching after reaching zero
I have an mechanim blend tree for controlling my idle to run animations, I'm controlling it with a float parameter speedPercent which is set in script. The blend tree works fine until the speedPercent hits 0.0.
The blend tree value starts glitching and changing see below \/
I start by running to full speed and then stop, as you can see the speedPercent value is correct but the blend tree value is changing weirdly above the threshold.
Is they some problem with the way i'm using the blend tree? is this a mechanim bug? if so is there a workaround?
thanks in advance.
Answer by Fenerax_Studios · Apr 28, 2020 at 11:17 AM
@pigglet I never found a 'Perfect Solution' the best I found was to manually set the value to 0 or very close to e.g. 0.001f from script that helps. It's a bit of a workaround but is better than having animation events firing all over the place.