Jump to content
  • Advertisement
Sign in to follow this  
bearsomg

Math Help - Automatically calculate camera rotation

This topic is 2335 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

Here's my issue:

My program has just a back wall and floor. The user is able to move the virtual camera around and zoom in and out. I need the floor to appear completely level, where the camera can only see the front of it, no matter what the Y translation coordinate or FOV is. What would the correct way to calculate the camera's Y rotation from the Y translation coord and FOV be?


Currently through experimentation, I was able to form an equation where it calculates rotation based on the Y translation coord, but obviously it does not work when the user zooms in or out (change in FOV).



I am using gluPerspective, and I would not like to change this.

Share this post


Link to post
Share on other sites
Advertisement
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!