Jump to content
  • Advertisement
Sign in to follow this  
dawberj3

Mouse Look Around a 3D scene.

This topic is 4842 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 seen the Quaternion but Im not really undestanding the code. Im looking for help on how to code looking aronnd a scene with the mouse. Ie, by srolling up, the view rotates along the x-axis, if u keep scrolling up it keeps going (doesnt stop at 90degrees). Same with looking left, right and down. WHich ever direction you are facing, by press forward (already implemented) it moves in that direction. I would prefer to use the gluLookAt function until I can get my head around the proper way with matrices. Any advice ? Thx

Share this post


Link to post
Share on other sites
Advertisement
You will have a hard time implementing this using gluLookAt because of gimbal lock, in terms of simplicity i think your best bet is a uvn camera system, it's not that much of a leap in terms of understanding so you should check it out, you have to build the projection matrices yourself, but there are some good tutorials, have a look here on gamedev or failing that google.

Share this post


Link to post
Share on other sites
I posted an example OpenGL camera class in this thread a while ago. It may not answer all your questions, but it is an 'out of the box' solution that handles 6dof or standard FPS motion. Perhaps it could be helpful to you...

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!