Hi guys,
I want to scale objects up and down, and know by what percentage from their original size I am scaling them by. They are children objects, with more than one layer of parent. It’s actually parent.parent.parent.gameObjectToScale. I wanted to know the maths behind scaling an object, which is already parented to objects which are scaled to different extents. I’d like to know the maths to calculate the world scale of that object.
These particular objects are Sprites, so I was thinking it’d be something along the lines ofchildObj.localScale = childObj.localScale * ((parentBounds * parentTransform.localScale) * (anotherParentBounds * anotherparentTransform.localScale) * (yetAnotherParentBounds * yetanotherparentTransform.localScale));
I know this exact calculation is totally wrong, but does someone know the correct way to do this?
Thanks!