1
$\begingroup$

I've created a box with a separate lid and I've created another object (consisting of a single edge that will be invisible in the final render) around which I want the lid to hinge. However, no matter how I set the pivot point or transform orientation, things don't hinge/rotate as I expect.

overview

It's hard to see the edge that makes up the hinge, it's about 1mm out from the edge where the lid and box meet at the back:

edge closeup

Note: rotation and scale have been applied for all objects.

I used Origin to Geometry on the hinge and set the origin of the lid to the same location.

I thought I'd then be able to set the pivot point to Active Element and the transform orientation to Normal and then rotate the lid around the hinge. But looking from above the rotation gizmo does not orientate itself with the normals of the hinge:

top view

If I turn on displaying normals and tab into edit mode, the normals for my hinge look as I expect them to:

normals

I want to be able to rotate things in object mode. For the sake of experimentation, I've also tried things in edit mode and here I can achieve the kind of rotation that I want in object mode like so:

  • I set my snap settings as shown down below and drag the 3D cursor such that it snaps to my hinge.
  • I then turn off snapping, set the pivot point to the 3D cursor, go back to select mode, and select the lid and hinge.
  • Finally, I use the gizmo to rotate along the axis that corresponds to the orientation of the hinge and things work as I want:

edit mode rotate

I'm slightly confused as to why this only works if I select both the hinge and the lid - isn't it the 3D cursor that I'm rotating about? But if I select just the lid then I end up rotating around something that's neither the hinge nor a global axis:

bad 3D cursor rotation

However, while I'm curious about why I have to select the hinge in this situation, my main issue is that I want to be able to rotate things in object mode (and in the end be able to easily animate this rotation).

Snap settings:
snap settings

Any help would be much appreciated.

Here's a .blend file with my box (it's just 1.5MiB). Note that ultimately the box will be in a scene with other objects so, solutions that rely on lining it up with the global axes won't work in the larger scene. Also, note that the box is slightly lopsided if you look at its dimensions - it's not a perfect cuboid.

$\endgroup$

1 Answer 1

1
$\begingroup$

First, select the Lid and enable origin only in the menu on the top right enter image description here

Then enable snapping, set it to edge and enable Align roation to target (Which seems to already be the case)

enter image description here

Then move the origin to the lower edge of the lid. You'll see the orientation will become aligned to this edge

enter image description here

Once that's done disable the origin button you enabled at the beggining and you can now rotate the lid with it's own origin

Next time model your meshes aligned to the world and then rotate in object mode, it will save you some time

Edit:

If you really want to use the hinge to rotate the lid, make the steps shown above on the hinge, then parent the lid to the hinge

https://i.sstatic.net/JxScd.jpg

$\endgroup$
8
  • $\begingroup$ Hi Alex, I tried that but it didn't work as described. I ticked origins under options, set the snapping as described and snapped the 3D cursor to the lower edge, then set the lid's origin to the 3D cursor and unset origins under options. However, the orientation did not become aligned with the edge as shown in your picture. Did you forget to include a step? I've repeated this several times so I don't think I'm leaving out anything. Also, I'm not actually trying to rotate around an edge of the lid but rather around a third object (the "Hinge" that you can see in the Outliner). $\endgroup$ Commented Nov 27, 2022 at 16:11
  • $\begingroup$ I'm using the 3.3.1 LTS release. And the mesh is derived from markers tracked through from a piece of real-world video - hence the lopsided nature (and an inability to choose an original location of the mesh, this is dictated by the location of things relative to each other in the original video footage). $\endgroup$ Commented Nov 27, 2022 at 16:15
  • $\begingroup$ You don't have to set the origin to the 3D cursor, if you do so it will reset its orientation. Just move the origin as shown and leave it like it is. I'll update my post with a gif on the steps to do $\endgroup$
    – Alex
    Commented Nov 27, 2022 at 16:22
  • $\begingroup$ When you enable the affect only origin button under the Transform menu (1st picture), any transformation you'll make will only affect the object origin point thus it's orientation too. So, go in object mode, select the object you want the orientation to be fixed and make sure the snapping is correctly set up. Then just move the origin point on the Hinge edge so it becomes alligned with it. No need to use the 3d cursor here $\endgroup$
    – Alex
    Commented Nov 27, 2022 at 16:37
  • $\begingroup$ Thanks for your last comment. But now I'm beginning to feel a bit stupid. How do I move the origin to a specific edge without involving the 3D cursor? I've googled and the standard answers all seem to involve first getting the 3D cursor to the desired location and then using Origin to 3D Cursor. Are you using an addon or something that allows a different approach? $\endgroup$ Commented Nov 27, 2022 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .