View Full Version : What is the 3rd "vector" in the arguments of LookAt?

05-17-2012, 04:19 AM
I wonder what is the 3rd vector (the 3rd row) in the following code?

gluLookAt( -512, -384, 700,
512, 384, 0,
0.0f, 1.0f, 0.0f);

It is strange that if the first row is 512, 384, (the camera's location), then I see the target as if I am standing with my eyes right on top of the desk's surface, but if I change it to -512, -384, that means I walked away to the lower left side of the desk and look down the floor?... or look at the desk? I thought the 3rd row tells how the camera is facing... so if I walk away from the desk and still face the same orientation, I should see the floor. So what is the third row anyway and how does it work?

05-17-2012, 06:45 AM
Please avoid doubleposts, i answered your other posting.