g0tp0t
03-29-2010, 08:20 PM
i am trying to get a camera to rotate around a box, but when the camera has rotated 180 degrees it abruptly switches direction and goes backward, and then when it gets back to where it started it abrubtly switches direction and does it all over again. here is my code
float I;
void draw() {
lights();
background(0);
I = I + PI/100;
// Change height of the camera with mouseY
camera(int(220*cos(I)), int(220*sin(I))+40, 0, // eyeX, eyeY, eyeZ
0.0, 0.0, 0.0, // centerX, centerY, centerZ
1, 1,0 ); // upX, upY, upZ
in 2d that would create a perfect circle... i think
======
can anyone help??? PLZ????
float I;
void draw() {
lights();
background(0);
I = I + PI/100;
// Change height of the camera with mouseY
camera(int(220*cos(I)), int(220*sin(I))+40, 0, // eyeX, eyeY, eyeZ
0.0, 0.0, 0.0, // centerX, centerY, centerZ
1, 1,0 ); // upX, upY, upZ
in 2d that would create a perfect circle... i think
======
can anyone help??? PLZ????