Jump to content
  • Advertisement
Sign in to follow this  
Compeau

Camera rotation problem (spherical camera)

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

I'm using a spherical camera with x, y, and z rotation. What I am trying to do is to get the camera to rotate along with an object. I know the yaw, pitch, and roll of the object, and when I apply those values to the x,y,z rotation values of the camera, it works sometimes (like when the camera is pointed straight down an axis), but other times the camera does not rotate correctly with the model. I was thinking I could get the position of two points on the model and of the camera, and then after the model rotates I can use this to get the new location of the camera. The problem is that I don't know how to convert this cartesian x,y,z value into rotational values. Does anybody know of a way to do 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!