I have a lego arm, and the body, but the arm does not rotate correctly.

I re-set the object's origin to be the center of the shoulder:

enter image description here

But when the object is rotated on the X-axis only, it appears to rotate on the Z ans Y axis as well a little.

enter image description here

How do I keep the mesh to stay flat against with the other when rotating?

Blend file:

New Blend file:

  • 1
    $\begingroup$ Do a google search for local and global axis... important concepts if you want to do 3D $\endgroup$ – user1853 Jan 17 '18 at 20:31

The arm is rotating as expected, the apparent problem lie in the fact that the plane of arm joint is not perpendicular to X axis, it is slightly inclined toward it.

The behavior you are expecting can be achieved by rotating around an axis that is perpendicular to the arm joint, it happened that the local space of arm is aligned with the plane of the arm joint, so rotating around the local Z axis of the arm will achieved what you want. Simply change to Local Transform Orientation and rotate by using R >> Z + Z.


Let us, however, assume that the local space of the arm is not aligned with the joint. We can then create a local space manually and rotate around it. A possible way to do it is by adding an empty that is perpendicular to the joint's plane, this can be done by aligning the view to the faces of the plane of the joint and adding an empty using the Align to view option. Parent the object to the empty and rotate around it's local Z axis as explained above.

| improve this answer | |
  • $\begingroup$ For some reason, I press Z twice after R, and it stays with the global rotation. $\endgroup$ – Akados Jan 17 '18 at 19:50
  • $\begingroup$ @Akados Are you sure you set the transform orientation to local first? $\endgroup$ – Omar Emara Jan 17 '18 at 19:53
  • $\begingroup$ Yes at the bottom, it says it rotates along the local Z axis. But appears to rotate around the Global. $\endgroup$ – Akados Jan 17 '18 at 20:02
  • $\begingroup$ @Akados Can you reupload the file? $\endgroup$ – Omar Emara Jan 17 '18 at 20:12
  • $\begingroup$ New one added. It used to be parented to the body if that changed anything. $\endgroup$ – Akados Jan 17 '18 at 20:18

Change the Order of the Euler Rotation.

If you wish to animate the rotation of the arm by keyframing in only one axis: Possibly the simplest way is to change the order of the Euler Rotation. If the order is changed to 'ZYX' the arm can be swivelled around local z axis without it being affected by its y axis rotation.

@OmarAhmad 's answer shows well the "seemingly erratic" nature of the x, y, z rotation values with differing orders, in this case 'XYZ' as in original file.

enter image description here

Changing the 3D view transform orientation to local also aids to visualize it's the local z axis you wish to rotate on.

To set local X as the rotation axis.

Part 2 in response to "Is there a way to reset or rotate the arm so it can rotate correctly only with the x-axis?"

shiftS Snap 3D cursor to origin. Tab into edit mode and select all. Make sure pivot point is set to 3D cursor and your are in front ortho view NUMPAD 1

R-90 will rotate such that x axis is pivot axis.

enter image description here

Tab back to object mode.

R90 will rotate the arm back to shoulder. You can now rotate on local x axis using 'XYZ' Euler.

enter image description here

Other methods could be to use an armature, or empties at the joints.

| improve this answer | |
  • $\begingroup$ Is there a way to reset or rotate the arm so it can rotate correctly only with the x-axis? $\endgroup$ – Akados Jan 17 '18 at 19:47
  • $\begingroup$ @Akados yes, edited answer. $\endgroup$ – batFINGER Jan 17 '18 at 20:13
  • $\begingroup$ Thanks. Now I figured out my issue is that I applied rotation in a further update of my model. I use your edited method and I was able to rotate on the Z Local axis again. But when it is rotated both on the Z local and global, they both make the mesh look like it's rotating on the X Global. Is there a way to undo the applied rotation, if that will fi the problem? $\endgroup$ – Akados Jan 17 '18 at 23:40
  • $\begingroup$ Could use same method as outlined in part 2 above, rotate the whole mesh in edit mode about the origin such that you have x axis normal to plane and y z on plane. (or download the first version of the file) $\endgroup$ – batFINGER Jan 18 '18 at 4:22

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.