Hello everyone, I have two quick questions for you
-
I have a horizontal cylinder that I want to scale along the x-axis. When I scale it, I want the left end to stay where it is and have the cylinder grow to the right. How can I modify the “mid-point” to make sure it doesn’t grow in the middle
-
I want smaller cylinders to collide with my main cylinder. When they do, I want my main cylinder to grow by the exact width of the smaller cylinder (like they are stacking). How can I know the “width” of the smaller bars and add them?
Thank you!
1 is pretty easy. You can modify the pivot point in your 3D package if you made the cylinder yourself, or if it’s a Unity primitive you can put it inside a parent GameObject, slide it to the correct relative position (so that the parent object is at your desired scale origin) and then apply the scale to the parent.
For 2 you could look at the bounding boxes of your smaller cylinders, potentially, depending on how they’re made. If they’re Unity primitives you could also potentially look at their scale. Depending on your programming experience and what you’re trying to achieve, there are other methods which might be more elegant, too.
The cylinders are Unity primitives.
I am a fairly strong programmer, just new to Unity.
Thanks for your response