PDA

View Full Version : gluLookAt



masonium
08-13-2001, 10:49 PM
I usually use glTranslatef and glRotatef for changing the view, but I recently discovered that gluLookAt is a much better alternative, especially when it comes to 3D engines. Anyway, I was wondering exactly how to use this function. I know that the first three parameters represent the location of the camera, but I'm lost from there.

RedZen
08-13-2001, 11:05 PM
The parameters consist of three sets of X,Y,Z coordinates. The first three being youre camera position, ths second three the point you want to look at and the last three being the up-vector. For example pitch, yaw, etc. etc. Experimentation is the key with the last three parameters. You can do some cool stuff with it...