PDA

View Full Version : gluLookAt - upVector Problem



TheBlob
05-17-2002, 08:46 AM
Hi Folks!
I have problems using the upvector-parameters of gluLookAt(...).

I have my camera positioned at the center (0,0,0) and it should face an object (x,y,z).
The Objects position always changes, so do I have to change my upvector too, because itīs the normal-vector to the vector between my oject and cameraposition (???)...
How is it meant?? Anybody please....
Thanks in advance!

satan
05-17-2002, 09:22 AM
if your upvector shall always be orthogonal to your view vector yes
if not no

depends on what kind of camera you want to simulate

Jambolo
05-17-2002, 10:03 PM
The up vector is not required to be perpendicular to the camera's direction but if you try to look in the direction of the up vector, you will have problems.