- Home /
How do I change the scale of only a portion of the object
Need when you press the up and down to change only the body, but to the top and bottom are not resized. Tried fully for all object zoom, but the top and bottom will melt very thick, they do not have to change the scale
Also did so, broke apart and script resizes ... but also did not work, also tried all trom often asked rigidbody and link them join
But also turned out badly
Help me ...... :)
Have you tried making it so you press up and down change the scale of the body and the positions of the top and bottom?
Answer by karljj1 · Feb 27, 2015 at 09:18 PM
You cant solve this by simply scaling everything on one axis. You need to scale the center column only and then shift the top to follow it. I have attached a simple fix. I added an empty gameobject to the bottom of the body to do the scaling and an empty gameobject to the top to act as an anchor point for your top.
Did you look at the example code? A pivot at the bottom will grow the body up ins$$anonymous$$d of both up and down. By placing an empty gameobject at the top and parenting it we can get it follow the top of the body as it also scales. This acts as an anchor point which we can attach our top to using a simple script.
Answer by alok-kr-029 · Mar 03, 2015 at 06:35 AM
Did you tried changing your pivote point . Make it a child of an empty game object and make the pivote point at its corner and try scaling the parent it will scale from one portion .