Original scaling.

Hi,
I would like to know if there is a way to ‘shut off’ the ‘attaching effects’ of the ‘local scalings’ from an object’s parent, grand parent and all the way up to its root, so that AS I rotate the child object, the child object’s scale doesn’t change. I have a door attached to a wall (as a child object), but since the local scale of the wall is not (1,1,1), when I rotate the door by the y axis, the rotation looks weird and the door scales incorrectly. I don’t want to make the door as a separate object, and want to make it a child under the wall object (for organization purposes). How would I do this? Is there a script that would do this?

Thank you,
Michael S. Lowe

Sometimes you can insert an empty game object into the hierarchy between the parent and child, and set its scale to be the inverse of the parent’s, thus canceling out the parents scale and resulting in a default (1, 1, 1) scaling for the child. But I don’t recommend it as anything other than a quick & temporary fix.

In general, I would say that the proper solution is to not have any of the ancestors be scaled at all. If you need to scale a mesh of one of the ancestors, you can extract that mesh out of the ancestor object itself and place it in a new child object, scaling just that child. For example, here’s a case with ancestors that have scaling applied.

A (2, 2, 2)
.
. B (10, 1, 1)
. .
. . C (scaling messed up)

This can be adjusted to become the following, such that scaling is (1, 1, 1) for any object that has child objects which shouldn’t inherit the scaling of their ancestors:

A_no_mesh (empty) (1, 1, 1)
|
| A_mesh (2, 2, 2)
.
. B_no_mesh (empty) (1, 1, 1)
. |
. | B_mesh (20, 2, 2)
. .
. . C (scaling still at 1, 1, 1)

2 Likes