Jump to content
  • Advertisement
Sign in to follow this  
OpenGL_Guru

Translating and Rotating using GluLookAt:

This topic is 5154 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
What axis would you want to rotate about ?

Red Book chapters have standard forumulae for rotating about x, y and the z axes.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!