I have a cube of a given length, width, and height.
I mark the extremes of this cube as xLow, yLow, zLow, xHigh, yHigh, and zHigh.
I have an object on the corner of that cube at (xLow, yLow, zLow)
If the initial scale of the cube is
h, and I add a value to the scale denoted as
d, what is the new (X, Y, Z) position of the object on the corner such that it stays on that corner?
I created a demo for this problem:
I tried the following equation:
cube.position.set(xLow + xLow * d, yLow + yLow * d, zLow + zLow * d);
However, this only works if the object’s initial scale is one. Otherwise, the corner object does not follow as the object scales.