angeldarkholme

10-13-2005, 08:47 PM

Hi everybody!

Here's my problem:

I want to follow a circle around the origin and look always at the origin, using gluLookAt....

My code is this:

glMatrixMode(GL_PROJECTION);

theta+=10;

float xp=10*cos(theta);

float yp=0;

float zp=10*sin(theta);

float xd=-cos(theta);

float yd=0;

float zd=-sin(theta);

float xu=0;

float yu=1;

float zu=0;

gluLookAt(xp,yp,zp,xd,yd,zd,xu,yu,zu);

Now....

What can I do to keep my object in the center of the screen instead of moving it around???

I don't now why I move all the scene around instead of moving only the point of view!!

Any help will be very appreciated.

Here's my problem:

I want to follow a circle around the origin and look always at the origin, using gluLookAt....

My code is this:

glMatrixMode(GL_PROJECTION);

theta+=10;

float xp=10*cos(theta);

float yp=0;

float zp=10*sin(theta);

float xd=-cos(theta);

float yd=0;

float zd=-sin(theta);

float xu=0;

float yu=1;

float zu=0;

gluLookAt(xp,yp,zp,xd,yd,zd,xu,yu,zu);

Now....

What can I do to keep my object in the center of the screen instead of moving it around???

I don't now why I move all the scene around instead of moving only the point of view!!

Any help will be very appreciated.