View Full Version : Changing the view

06-06-2006, 06:33 PM
Alright quick question. I have a object orbiting the orgin how would I follow the object with the viewport?, I believe this would acheiving an effect that creates the illusion that the object is not moving at all. I believe you use gluLookat but I am not sure

06-06-2006, 11:13 PM
Yes you would use gluLookAt();


gluLookAt(cam.x, cam.y, cam.z, obj.x, obj.y, obj.z, up.x, up.y, up.z);

where cam is the camera position
obj is the object position
and up defines which way is up