Advertisement

gluLookAt doesn't work?

Started by September 15, 2000 05:28 PM
4 comments, last by skyfire360 24 years, 2 months ago
Hi Sorry to bring this topic up again, but I can''t seem to get my gluLookAt() to work. Here is what I''ve gathered from other posts: gluLookAt(5,5,5,0,0,0,0,1,0) 5,5,5 = Position of the "viewer" 0,0,0 = The point that you want to look at 0,1,0 = ? I''ve tried putting this code at the beginning, middle, and end of my DrawGlScene() and it doesn''t seem to do anything. I change all the 5s to 500 and still no change. Any Suggestions?
I do real things with imaginary numbers
Haha, scratch that, I kinda figured it out (stupid glLoadIdentity()) I still don''t know what those last 3 parameters do. Can anyone fill me in?
I do real things with imaginary numbers
Advertisement
The last three params point up, usually (0, 0, 1)
the last 3 numbers in gluLookAt are for the up vector. meaning what is up. if you specify (0, 1, 0) that means the positive "y" axis is up.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
You might want to go with what Ozz said for the direction of up, even though the logical way after two dimensions being horizontal and vertical is to have the z-axis coming out at you and, by default, OGL sets it that way... It is generally accepted that the z-axis is up, in all math courses dealing with 3-dimensional geometry you''ll see that. So get used to it.

S.
All you have to do is enable Model View (glMatrxMode(GL_MODELVIEW)) and then glLookAt(...)..
Well.. I wish it helps you...
See ya soon...
=====================================Regards,Juan Pablo (McKrackeN) Bettini Psychoban Official Site:http://www.psychoban.comPsychoban on iTunes App Store:http://itunes.apple.com/us/app/psychoban/id378692853?mt=8

This topic is closed to new replies.

Advertisement