View Full Version : Camera's problem

08-27-2000, 08:32 PM
I'm new here. Right now I'm developing demo program using OpenGL. I want to make a terrain and can observe the terrain from the top. I've been able to make the terrain, but the problem is how to move the camera and then make rotation on camera. I've tried using gltranslate and glrotation but the result is not like what I expected. Please help me ?


P.S Sorry, my english is bad.

Divide Overflow
08-27-2000, 08:58 PM
It sounds like you need gluLookAt, e.g.

gluLookAt(CurrentCam->x, CurrentCam->y, CurrentCam->z,CurrentCam->LookAt.x, CurrentCam->LookAt.y,CurrentCam->LookAt.z,
0, 1, 0);

And don't forget to load the identity matrix http://www.opengl.org/discussion_boards/ubb/wink.gif

--> Divide

[This message has been edited by Divide Overflow (edited 08-27-2000).]

08-27-2000, 09:15 PM
I've tried using gluLookAt before. Can you tell me more about gluLookAt ?
Am I must compute by myself every movement of the camera and find the coordinate of the LookAt manually. I can do that but is there any other way simplest than that way.