gluLookAt - matrix ops

Started by
12 comments, last by coba2 16 years, 10 months ago
Quote:Original post by coba2
Hi.. I a beginner...

I want to use gluLookAt.. But I was confuse for fill the parameter. First x,y,z is for a position of camera i guess. But in second and third x,y,z what for?? I have read the MSDN help..but still confuse to implement. Can you help me to explain because i want to implement it..

Thanks


In gluLookAt the first xyz is for the camera location,
the second XYZ is for the location of the thing you are looking at and the last is for a vector that says were is up.

Advertisement
The last xyz is for the vector that says were is up????

I'm don't understand about it... Can you explain more about it??
Think you are in an airplane located in a x,y,z location and you are looking at an island in a x,y,z location.

You still need to know were up is (the up side of the airplane) because the view will be diffrent if the air plane is upside down.
OK.. i has know about this code...

But I have some problem with my project. In my project I draw a camera in position 1,1,3. After that I using glLookAt (1,1,3,0,0,0,,1,0). And the result is so weird. My object camera that i was draw.. still on there but viewing has been change...

I was confuse.. what wrong from my project???

This topic is closed to new replies.

Advertisement