View Full Version : Quick gluLookAt() question
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?
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);
im not too sure i dont think it matters , personally ive never found the need to alter the direction of 'up'
02-27-2001, 02: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? 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!
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.