1
\$\begingroup\$

I was wondering if anyone experienced this issue in Unity with Mecanim-animated characters ...

I have an animated player character with a third-person camera control (Game Camera from the asset store, even though I think it isn't really related) and if the character is standing at the default y-rotation angle I can orbit around her with the camera and she will always face the same direction, as it should be.

But if the character stands with an arbitrary other transform y-rotation (for example 90.0001 or 180, etc.) and I orbit around the character, the character's Y rotation is ever so often randomly changed.

I don't know what changes the Y rotation. Game Camera doesn't touch it as long as I don't move the character so I suppose it is related to Mecanim, even though i'm not sure about that either.

I was hoping somebody has more familiarity with this issue and know what causes this. This glitch is definitely a problem in gameplay.

\$\endgroup\$
2
\$\begingroup\$

Some values of Mechanim animations are absolute. Then you rotate or move your character, actual values changes, but animations still use old hard-coded values in wolrd-space coordinates. You should try to put your character into empty parent object. Animate character itself, but rotate and move the parent.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.