Mecanim : Quaternion To Matrix conversion failed because input Quaternion is invalid

Hi,

I’m testing the workflow of Blender Rigify to Unity and everything seems to be working properly except I receive this spam in the Unity console when my rig is in the viewport:

Quaternion To Matrix conversion failed because input Quaternion is invalid {-1.#IND00, -1.#IND00, -1.#IND00, -1.#IND00} l=-1.#IND00

I’m not sure how to go about debugging this. Everything looks right in the Mecanim config and the muscles appear to work properly I just want to get rid of the spam.

Thanks.

Does the error appear when you press play, or just when the rig is in the viewport?
I tend to get this message when there is animation playing on a character and unity is trying to play more than one animation at a time. For example I would have accidentally had two animation controllers somewhere on the character.
Or it could be that the animation clip is not set up correctly, and the animation clip length is longer than the the actual animation exported. Whenever I got that kind of message those two things were normally the cause.
Not sure if that helps…

1 Like

It happens in both of those cases and in the Mecanim configure mode when using the Muscle sliders so I’m guessing there is just something wrong with my rig even though it appears to work properly.

ah right, Ive not had that error at that stage. Only once i have began to assign animations to the character do I see it occasionally.
I don’t use blender, it could be something to do with additional bones and rigging coming in on import which humanoid doesn’t support. its really picky.
Sorry i cant be of more help, good luck :slight_smile:

Yeah, I’ll have to keep digging. Thanks for your help.

Hey, did you get anywhere with it. We’re getting that problem now.

In tUnity’s Animation window I created a simple animation clip for a 2D object that rotates about 30 degrees on the Z axis. It plays perfectly in the Animation window. But when I put it in an Animator and run it, it gives me a bunch of errors:

Quaternion To Matrix conversion failed because input Quaternion is invalid {-1.#IND00, -1.#IND00, -1.#IND00, -1.#IND00} l=-1.#IND00

Invalid AABB result
IsFinite(outDistanceForSort)

UnityEditor.DockArea:OnGUI()IsFinite(d)

UnityEditor.DockArea:OnGUI()UnityEditorInternal.AnimationWindowHierarchy:.ctor(AnimationWindowState, EditorWindow, Rect) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowHierarchy.cs:47)UnityEditorInternal.AnimationWindowHierarchy:Init(EditorWindow, Rect) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowHierarchy.cs:72)UnityEditor.TreeView:ReloadData()UnityEditorInternal.AnimationWindowHierarchyDataSource:FetchData() (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowHierarchyDataSource.cs:43)UnityEditorInternal.AnimationWindowState:get_allCurves() (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowState.cs:343)UnityEditorInternal.CurveBindingUtility:GetEditorCurveValueType(GameObject, EditorCurveBinding) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/CurveBindingUtility.cs:21)UnityEditor.AnimationUtility:GetEditorCurveValueType(GameObject, EditorCurveBinding)QuaternionToEuler: Input quaternion was not normalized