PDA

View Full Version : Camera's problem



hendra.o
08-27-2000, 09:32 PM
Hi,
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 ?

Hendra.

P.S Sorry, my english is bad.

Divide Overflow
08-27-2000, 09: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).]

hendra.o
08-27-2000, 10:15 PM
Hi,
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.

Regards,

Hendra.