- Home /
Why does rotating a bone on one axis affect others and translation
I imported a simple model from Blender as a .blend file, has an armature. It works fine in Blender. In Unity, in the editor, I can rotate bones manually. But the odd thing is, even though I rotate on, say, X, I can see Y and Z values changing, and odder still, there's movement in the translation. I can understand if I was looking at a child bone's transform, but I'm not. What might cause this, can it be fixed? I just want rotation on one axis.
Answer by ScroodgeM · Aug 26, 2012 at 10:35 AM
rotation in editor is represented as euler angles. it's a lot of information about it here and not only here. euler angles is just a representation of Quaternion, that internally used for store and manipulate rotations. if you rotate object around only it's own X/Y/Z axis, it doesn't mean euler angles will change only it's X/Y/Z axis that you rotating around.
if you want to rotate object around some axis, you can use this, this or this
never use euler angles to read and examine data
I think he means manually rotating in the editor, not with any script.
Well, rotating it manually in the editor does use a "script". The TransformInspector also uses localEulerAngles to view and change the current rotation.
I understand about how other Rotation components might be affected, but why would the Position components change too?
Answer by Bunny83 · Aug 27, 2012 at 08:48 PM
Make sure you have set your editor modes to "local" and "pivot". Using "global" and / or "center" rotation or movements will cause some strange results. Usually you don't want to rotate bones manually. You usually have animations that set the local angles to absolute values.
More details can be found here.
Thanks. I'm trying to move a joint programatically though. I have tried those settings, but it makes no difference. Whether manual or code, affecting one axis of rotation affects the translation somehow, like it's doing a Skew or something.