- Home /
Good way to scale parent without scaling children?
I'm working on a project with features similar to a character creation app and I've routinely needed to work around a useful but sometimes annoying feature of Unity and its hierarchy structure. Basically, I would like to be able to scale a bone gameObject out of the character's skeleton without also scaling the child bones. This way I can create sliders which modify specific parts of the bone structure and change things like leg length and shoulder width and etc. Ordinarily when I don't want the scale of the object to affect its children, I just inverse the scale of the parent, but the system needs to work additively, meaning multiple sliders can affect the same bone over an update and the adjustments shouldn't override each other. If I have a bone scaled at (1,1,1) and a slider adds (0.1, 0.1, 0.1) to that scale, is there a good way mathematically or through code to apply a reverse scale to the children of that bone and negate it?
Answer by JxWolfe · Jun 18, 2017 at 08:06 PM
It would possible to get a list of all the children, break there parent, scale, then reparent them... It seems like there should be a simpler way, but that would work.
Your answer
Follow this Question
Related Questions
Make gameobject a child without affecting scale? 1 Answer
Problem with child and parent. 1 Answer
Object scale/rotation changes when parented to flipped object 0 Answers
Make a simple tree 1 Answer