changing size of object, scaling

I have a child object under a parent. when the parent scales down, so does the child. is there a way to tell the child to always keep the same scale?

1 Answer

1

You can un-parent, scale and re-parent.

To do this in code would be

var children : Transform[];
for(var child : Transform in parent) {
    child.parent = null;
    children.push(child);
}
parent.localScale = something;
for(var child : Transform in children) child.parent = parent;

You could also do things with lossyScale like storing the lossyScale of each child, scaling the parent and then resetting the lossyScale of each child to the stored values.

thanks! I'll give that a try tonight.