Hi everyone. So I was playing around with JPCT for Android, and discovered a small issue while playing with the default HelloWordAE example. Basically, I wanted to rotate the cube around on one of its edges. Everything went well, set a rotation pivot cube.setRotationPivot(value), then made the call cube.rotateX(value).
The strange thing I have discovered, is that when I set the rotation pivot, it must be set with with a difference from the original value. For example, if the Scale of the cube is 1, the rotation pivot values are
x=-1;
y=-1;
z=-2.4f;
so we add 0.4 to the value we need
if the scale is 10, then are the following values
x=-10;
y=-10;
z=-24f;
we add 4 to the original value
if I don't add the 0.4 or 4, the cube is not rotating on the edge, but is slightly displaced
Can anyone explain why this is happening? Wanted to create some things, but this is holding me for a while
Or maybe I am missing something?
I appreciate any hints or information about this.