How to keep the volume of an obj when reshaping?
I want to make a script that changes the obj's X & Y when altering the Z to keep the same volume.
My problem is that if I for instance have that when I set Z, the X & Y change accordingly but how do I enlarge (or shrink) X & Y equally?
What I thought of was to do this:
// V = Volume
// V = X*Y*Z
X = V/(Y*Z);
Y = V/(X*Z);
But then I realized that that doesn't make any sense because when I run the first line, Y still has it's same size as before and has yet to be altered.
So how do I make a formula that calculates X & Y equally?
Your answer
Follow this Question
Related Questions
Vector3 Help - Calculating velocity toward a point 1 Answer
Vector3.Distance keeps growing 0 Answers
how to provide axes input to fpscontroller according to maincamera y rotation ? 0 Answers
How to create Curve between two points using **Vector3.MoveTowards**? 0 Answers
Rotate object in 3d space along one axis in the direction of movement vector. 0 Answers