Sign in to follow this  

Camera rotation problem (spherical camera)

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

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