Forcing Quaternion Interpolation for every animation/transition ?

Hey guys,
Having quite some problems with mecanim characters switching from f.e. crouching to standing while turning around where usually its the legs which rotate 359° backwards instead of 1° forward.
Now I know quaternion instead of euler interpolation fixes this but it seems the transitions between animations ignore this and use eulers instead ?
Is there a way to force unity to just always use quaternions? Or is it doing that anyway and there’s another reason for this behaviour ?
Using 2017.3.0f3

EDIT: Just realized you can’t even set quaternion interpolation on any mecanim rotation keyframes for bones/rootQ. So far just attempted to let animations made in blender transition where the legs all get screwed up. Any reason this only works on the transforms rotation?

I’m not sure I can help but I don’t quit understand everything that is going on. Are your animations made in blender or are you trying to move character bone rigs in unity? Are you also saying that when you rotate your blender animation it screws up the legs? You should be making all your animations in blender or other program first and then use mecanim to blend. If your imported blender model is rotating the legs incorrectly then I would guess you rigged the model incorrectly and should go back and do it again. Typically, unwanted mesh deformations are caused by improper character rigging/weight painting in blender. I know I have had to go back and re-rig a character more than once due to one little screw up in blender.

Also check to confirm Tpose has been established in Unity under rig configure.

The animations work fine by themselves but when transitioning between one to the other with the animator the legs suddenly rotate 360°.
Imagine someone working on the ground then as you click talk they stand up and turn around. The transition between the workidle and the standingup animation is the problem. Any clues on how to fix this ? Since the animations work fine I don’t quite know what to even try to change.

There are no unwanted mesh deformations and the T-Pose has been established.

( The edit was just me finding out that editing keyframes in unity is not a good idea but that’s known. )

I have never ran into that problem myself. Animator2b knows more about animations than I do so he might be more helpful. However, I still think it’s an issue with your rigging in Blender. Animations can work fine by themselves but if the bones are parented correctly they can have some weird effects on the model during different sequences. Good luck with your issue and Happy Gaming.

1 Like

Did you create both of those animations yourself in blender?
Do the animations have correct avatar definitions? The same definitions as the character.
Were the two animations (workidle & standing up) created on the exact same rig?
These are humanoid rig setup in Unity correct?

Test:
Have both animations on the same rig/character in blender back to back on the timeline with like 5 keyframes in between each cycle to mimic a transition in Unity. Export as fbx. Reimport the fbx back into blender. Does the two animations work correctly without the leg twisting when reimported back into blender?

What import/export workflow are you using? fbx or blender file, and which flavor of fbx?

If we can’t solve with these troubleshooting processes I think submitting a bug will help. Animation team are tops on bug tracking, fixing and followup.

1 Like

Thanks guys for helping. :slight_smile:
That just putting those 2 animations onto a timeline gave me the final clue!

Turns out in timeline mode unity did not even show the legs in the standup anim even though it showed them animating in the game correctly!
The animation did not have keyframe info for all the muscles. I thought it’d be wise to strip all the bones keyframes without important info but apparently mecanim can’t fill in the gaps during transition correctly. So I guess from now on I’ll always leave all the keyframes for all the muscles in. Oddly enough all the feet/leg muscles were in. Perhaps it was some missing hip/spine muscle.

Glad you solved. Animation issues are so ‘different’ all the time because we all have different character setups, for different games and different needs.
Even though we don’t use the same software (I use 3D Max mostly) we can still help each other out related to animation, giving pointers and suggestions sometimes leads to successful results. :slight_smile:

1 Like