that's right. Camera.rotateXXX(..) methods rotates camera around it's position. in other words camera's rotation pivot is always its position.
if you need to rotate camera around and arbitrary pivot, you should do the math yourself. it's not that hard. some trigonometry will be enough.
or alternatively, you can add a dummy child to a dummy object, rotate parent object as required and set camera's position to child object's position.
Thanks for the replay
I'am new to open gl and the jpct class so I am sorry for the stupid questions:)
I tried this code for rotating left and right byt i stil get the same effect.
(the different line is the line whit the ****)
if (StartEngine.touchTurn != 0) {
**** world.getCamera().rotateCameraAxis(new SimpleVector(0.0,1.0,0.0),StartEngine.touchTurn);
Y=world.getCamera().getYAxis();
X=world.getCamera().getXAxis();
StartEngine.touchTurn = 0;
}
how can I compute the roating vector ?
can you please tell me what am I doing wrong?
or show me how it is done
p.s
for the Y vector when I am rottating around X(rotatin down up) i am geting this values:
for down rotatin:
Y AXIS(3182): (0.0,0.999803,0.019883258)
Y AXIS(3182): (0.0,0.999803,0.019883258)
Y AXIS(3182): (0.0,0.99955416,0.029880127)
Y AXIS(3182): (0.0,0.99955416,0.029880127)
and for up rottating:
Y AXIS(3182): (0.0,0.99955416,0.029880127)
Y AXIS(3182): (0.0,0.99955416,0.029880127)
Y AXIS(3182): (0.0,0.999803,0.019883258)
Y AXIS(3182): (0.0,0.999803,0.019883258)