Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

Best way to implement this view/camera style?

This topic is 4381 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 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
Advertisement
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
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!