Problem with Animator in 5.2 causing NaN data

Since updating to 5.2 we’ve been getting an intermittent problem where a node in the animation hierarchy would end up with NaN values (both positional and rotational).

We tracked it down to the fact we switch the animator speed from 0 to 1 quite often as we have objects that only animate when unseen. This has never been a problem before.

By changing the code so it instead uses enabled, the problem goes away. But this is not an ideal solution. Should this be entered as a bug? It also looks like it may have been happening pre 5.2 due to the following post.

http://answers.unity3d.com/questions/1036735/lots-of-errors-using-speed-multiplier-in-animation.html

Just an update to say this is confirmed with more testing. Going to and from anim speed 0 and 1 causes NaNs. But going to and from 0.000001 and 1 works fine.

Anyone got any ideas?

Thanks.

Yes. Bug.
I submitted bug report.
It is related to setting an animation speed to 0 a certain amount of time after the game starts.
http://forum.unity3d.com/threads/unity-5-2-0-animator-speed-0-bug-like-the-stack-trace-option.353933/

1 Like

Great, glad it’s not just us.

This is still an issue in 2018.3?