- Home /
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.
Are you using animations? I had a similar error once when an animation edited in the Animation window produced some weird key frames.
Answer by rolfewiz · Sep 19, 2015 at 03:31 AM
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.
Apparently this was it for me too. I had multiple Animator
s trying to animate the same model.
Thank you for this, it put me in the right direction. I had a animation over lapping another. weird how that happend.
Answer by Owen-Reynolds · May 20, 2013 at 03:12 PM
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.)
Ok, so I removed the animation controller and it stopped the error (but not the animation ???). Now I get an error that says "Number of bind poses doesn't match number of bones in skinned mesh." I only have the one skinned mesh, but what does this mean and how can I fix it?
It probably means there was a glitchy rotation in an imported animation. The real fix is to go back to $$anonymous$$ax/Blender and fix it or reimport.
I guess you could try playing animations one at a time, to narrow it down. Or Play the Asset through the Inspector to see if you can get the error. Or ask an Animator.
Answer by bugmagnet · Oct 20, 2015 at 04:55 AM
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.
Answer by mr_zog · Jan 29, 2016 at 09:06 PM
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 :/
Answer by Posch · Jun 09, 2016 at 12:11 PM
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 :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613102603im_/https://answers.unity.com/themes/thub/images/avi.jpg)