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:
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:
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!