0
$\begingroup$

I am creating a building for export to an external game engine. Before exporting, I need to ensure the doors of the building are separate objects and have their local axes aligned to the the plane of their normals. The doors are initially created from the main part of the model (to ensure correct positioning and orientation) and then separated.

The issue, of course, is that these doors have local axes aligned the same as the original model, rather than reflecting their own individual rotation:

enter image description here

Before exporting, I need to correct the local rotation to match the actual orientation, so that i can script it in the game to slide along its local x axis.

I have had to face this issue many times in the past and having given up trying to find the correct way to solve it, have resorted to a kind of bodged workaround to fix it which involves orienting my view to the plane of the door, creating a cube as a helper object aligned to that view, joining the door to the cube and then deleting the faces of the cube, as in the picture below:

enter image description here

The issue with this, of course, is that the object then takes on the name and properties of the cube, rather than keeping its original properties.

Having used this method for years and driving myself insane with the tedium of having to rename every single object after performing this "correction", it occurred to me that there must be an actual "real" way to simply flip the local orientation of an object to match the normal of a specific plane in the object .....

... can anyone tell me what that "real" way is please? (or suggest a different workflow to achieve my goal with less tedium!)

Thank you!

$\endgroup$
4
$\begingroup$

Nowadays, it's:

  1. (Object Mode) Header > Options > Affect Only > 'Origins'.
  2. (Edit Mode) Select a face/3 verts (Z normal) or edge/2 verts (Y along) you want to align to, and create a Custom Transform Orientation from the selection. (That's the little '+' in the Header > Transform Orientations dropdown)
  3. (Object Mode) Header > Object > Transform > 'Align to Transform Orientation'.

Depending on version, you may have to go into the F9 'Adjust Last Operation' panel on the alignment, to select the right orientation.

$\endgroup$
2
  • 1
    $\begingroup$ omg that is amazing, thank you! I have never ever seen that "affect only" option before ... that is going to come in so handy for so many things. Thank you very much. $\endgroup$ – Ashlee Cadell Apr 8 at 18:06
  • $\begingroup$ It came with 2.81 or 2.82 if I remember it correctly... $\endgroup$ – Gordon Brinkmann Apr 20 at 6:35

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.