Sign in to follow this  
OpenGL_Guru

Translating and Rotating using GluLookAt:

Recommended Posts

ive got the translating down and all that but i am confused as to how i would rotate the camera using gluLookAt: for instance i have a simple scene and i want to turn the eye position on a dime, 45 degrees, then translate some more then 90 degrees.. etc etc...i am confused about this part -- maybe i am making it too hard..

Share this post


Link to post
Share on other sites
all i did was use the mouse to rotate on the x and y axis. using the change in x and y's values i incremented or decremented the angle for the x and y axis of glulookat. simple trig using sin, cos, and tan will help u obtain the x, y and z values of the target. my up vector stays the same at 0,1,0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this