Quaternion to Matrix conversion failed, but I'm not doing anything with either??

I started getting this error, saying about a failed conversion between quaternion and matrix, but I’m not trying to do anything with either of these types. Here’s the error:

Quaternion To Matrix conversion failed because input Quaternion is invalid {0.662466, 0.148788, 0.735628, -0.018502} l=1.002490

This is happening in some of the unity built in files (not my code). I have tried to reinstall unity and using a different machine, but nothing works.

If anyone could shed some light on what the problem is, it would be greatly appreciated.

I had the same error spamming the log. I had 2 animators on the prefab (on different GameObjects) both trying to animate the same bones.

Quaternions (and matrices) internally represent rotations. So if you have a bad rotation set somewhere, it can trigger this. Common way to get a similar error is accidentally looking at yourself. It is a pain when it won’t tell you the error right away – but there probably is one thing you’re doing that caused it, delayed effect.

Check for some nonsense rotation code – maybe a rotateAround using axis 000, or a hinge rotating around 000. One trick is to remove big chunks (or rebuild in a new new project) until you see what part fixes/causes it (including things like disabling animation.)

I had this issue as well, I don’t know exactly what caused it but I fixed it by reordering my animation layers and setting one to additive.

Just had the same problem with Unity 5.3.2 (upgrading from 4.6).
It looks like an animation clip got corrupted. You can verify it, by trying to preview the anim clip in the anim clip inspector. It failed aswell.
Sadly, the error was quite misleading and it took quite some time to find out :confused:

If this won’t work for you :
Try optimizing the Transform hierarchy by clicking on “Optimize Transform Hierarchy” in settings of the Component in the Inspector view - This finally worked for me :slight_smile:

I have an experience of this error as well, and I hope this might help.
The error message for me is:
“Quaternion To Matrix conversion failed because input Quaternion is invalid {-1.#QNAN0, -1.#QNAN0, -1.#QNAN0, -1.#QNAN0} l=-1.#QNAN0
It happens when my character is trying to “pick up” an object, and the object’s transform.parent is assigned to the character.

After googling around and trying with many possibilities, I solved the problem by re-structure my object that to be picked up. Make sure the object itself contains a meshrenderer, not only the children of the objcts have meshrenderer.
I cannot explain why, but this solves my problem.