I have a 2d game. I have a parent GameObject that is assigned a random local scale when it is instantiated.
I have a child GameObject inside that parent that I do not want to change the local scale of when the parent is instantiated.
I am thinking I need to get the transform.parent.localscale and run some sort of calculation with that to always return the child GameObject’s local scale to a Vector3 (.3f, .3f, 0). As to what that calculation is or how to go about it, I am completely lost.
This would help my game development journey very much.
So I have found a solution to get the results I want currently and I think it will ultimately work with some modification but I would really like to start using non static functions and calculations to further my game development skills.
I am just setting the child GameObject’s local scale very small and then running this in the update function.
I will likely only run this a few seconds after the parent GameObject is instantiated if I keep this, but if someone can help me with a calculation in my OP I would be very grateful.