Skip to main content
GameDev.net gamedev.net
🔒 Locked

GluLookAt

Started by Vyse of Arcadia Jul 13, 2003 at 5:50 PM 1 replies 550+ views
Original Post
Vyse of Arcadia
Vyse of Arcadia
What is the difference between the position, the view, and the up vector in GluLookAt? Nothing lasts forever... Except styrofoam.
Nothing lasts forever...Except styrofoam.
shadow12345
shadow12345
the GluLookAt function performs the same set of transformations to the world as you would have done with the glTranslate/glRotatef commands. The position is the X, Y, and Z coordinates of the Camera''s position in the world. The View is the (Position+ViewingDirection) vector (it is the direction you are looking in from the camera''s position).

The Up vector specifies your orientation in the world. The OpenGL standard is to have the Y axis as the Up vector (that''s called a right handed coordinate system). The quake games use the Z axis as the up vector. I personally prefer the former, but technically you can have any vector as the up vector (although it will distort your world if you don''t use the proper orientation that was in mind when the world was being constructed).

Hope that answers your questions.
Why don't alcoholics make good calculus teachers?Because they don't know their limits!Oh come on, Newton wasn't THAT smart...
Vyse of Arcadia
Vyse of Arcadia
Ah, thanks! I thought it might be something like that, but I wasn''t sure.

Nothing lasts forever...
Except styrofoam.
Nothing lasts forever...Except styrofoam.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.