PDA

View Full Version : Quick gluLookAt() question



02-26-2001, 04:47 PM
When using gluLookAt(), where exactly is [xtarget, ytarget, ztarget]? Is it in the center of the viewing volume? Or the center of the far clipping plane?

One more quick thing, does the magnitude of the "up" vector matter? Does it need to be normalized, or can it be any length?

-Gracias!

zed
02-26-2001, 06:40 PM
A/
its the position in worldspace where the camera is looking at (not to be confused with a direction)
u could make it a direction though easily enuf by going
gluLookAt( camerpos.x .., .., camerapos.x + cameraDirection.x, .., .., .., 0,1,0);
B/
im not too sure i dont think it matters , personally ive never found the need to alter the direction of 'up'

mcbastian
02-27-2001, 03:04 AM
I had the same problem when making the "camera rotates" effect. I had no need to normalize it.
but you should check if this vector is ortogonal (90) to the direction (position-vector minus lookat-vector)


Bastian.

john
02-27-2001, 01:45 PM
Bastian? You have the coolest name. http://www.opengl.org/discussion_boards/ubb/smile.gif To think that my surname is someone's first name in some parts of the world!

cheers,
John (Bastian=)