Sign in to follow this  
johnnyBravo

Best way to implement this view/camera style?

Recommended Posts

I'm intending to create a view/camera where the entire scene is situated in front of you, and you can rotate the scene on the x,y and z stationary axises. For example imagine you have a floating ball in front you, which with your hand you yaw it on the y axis(up) by spinning it left or right, or you pitch it on the x axis(right), by spinning it away or towards you. The viewer's axises never change and the ball always rotates via these axises. I hope I've made that clear, my question is on the method of implementing this. Would it be best to rotate the world matrix via the stationary axises and have the camera stationary, and then multiply all the scene matrices to the word matrix before transforming them? or should i spin the camera's position, up, right around the scene? Which seems a little more difficult but better because it lessens the amount of multiplying matrices stated above. Also with this should I stick to matrices or would it increase the smoothness if I use a quaternion? thx

Share this post


Link to post
Share on other sites
Hi. I would choose the fixed camera approach and transform the objects. I think this is simpler than doing the whole camera system.

Share this post


Link to post
Share on other sites
You really wouldn't save anything, because either way you have to transform something. In the pipeline, it would concatenate the view matrix with the world matrix to get the world vertex position. Whether you set the view matrix or the world matrix is a mute point. If all you want to do is spin the object, you wouldn't have to manually multiply each vertex in the object by anything...and maybe this is what you were unclear about. Just set the world transform and you'll be fine.

Hope that helps,
Chris

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