I have an in-place animation that I added curves to (In the rigged FBX which has the animation). I created 2 float parameters in the relevant controller with the same names as the curves in the animation clip.

Now, when I get the value of the float using animator.GetFloat(), the values I get are not in the value range I entered in the curves. My range is between 0.0f and 4.0f but what I get is approximately -0.6f to 0.03f. Why is this? From what I could gather from other threads, there is some blending going on with some other curves. What is this blending? And if there is some blending happening, how can I remove that?

I'm using Unity 5.1.1.

  • \$\begingroup\$ Hey can you add more details to the answer. Sorry I am not able to understand it properly. Also it will be of great help if you can attach some screen shots of the curves and parameters :) \$\endgroup\$
    – Hash Buoy
    Sep 2 '15 at 7:02
  • \$\begingroup\$ Unfortunately screenshots aren't really going to help. The problem is that if you add any curve to an FBX with a humanoid rig and then access that curve in the Mecanim controller (say with GetFloat) you get values that seem to be random. If you generally use an AnimationCurve and then evaluate it using the Evaluate() method then you get the right range and values. Problem is only with how mecanim blends the curves and what it blends with. So basically just looking for documentation more than anything else. \$\endgroup\$
    – Gibtardo
    Sep 2 '15 at 10:11


Ok so after messing around a lot I figured that this behaviour happens only when you evaluate the curve in OnAnimatorMove () function (with Animator.GetFloat). If I do the same in say FixedUpdate then the values received are correct. Don't know why this is and FixedUpdate is not the place where I would want to do this so continuing to further explore this. A bit irritated with the lack of documentation on this to be honest.

I have now posted a thread on Unity support forums and followed up on Issues tracker with an issue that pretty much has the same content as my question.

Unity Issues Tracker has closed the issue saying that this behaviour by design. That seems to make some sense. However, I am still puzzled by this because we don't know (I don't know) exactly what the design is. As it is, it seems that these values are coming out of nowhere. I have requested for some documentation on how this blending actually happens. If someone else here has a clue then please do let me know.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.