Jump to content
  • Advertisement
Sign in to follow this  
MannyZanny

Camera Rotation and Program Structure

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

My first question is it best to rotate the entire scene in order to rotate or rotate the camera using the eye and look. I have gotten the matrix rotation to work and thought it would be better to rotate the camera vectors for eye and look. This worked except for sometimes when I move the camera it goes a little wacko sometimes. The rotation or movement alone worked fine though. I did it by rotating vectors and a little math. Is this the wrong approach? Second is structure for game programming. Should you render by a timer, do physics calculation by a timer, input from the user as they press buttons. Some ways would obviously make a jumping game, what is the correct structure?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by MannyZanny
My first question is it best to rotate the entire scene in order to rotate or rotate the camera using the eye and look.

I have always preferred creating a separate camera matrix instead of adding it right into each entity's transformation stack. However, it really goes to the same exact place in the end, so it doesn't matter. D3DX has some cool camera functions that you can use, though.

Quote:
I have gotten the matrix rotation to work and thought it would be better to rotate the camera vectors for eye and look. This worked except for sometimes when I move the camera it goes a little wacko sometimes. The rotation or movement alone worked fine though.

Have you looked at D3DXMatrixLookAtLH()? It's a very easy to use look-at function.

Quote:
Second is structure for game programming. Should you render by a timer, do physics calculation by a timer, input from the user as they press buttons. Some ways would obviously make a jumping game, what is the correct structure?

In a lot of large games, the different core sections of the engine run on different intervals. For example, graphics might run every frame, physics every 25 ms and input every 15 ms. However, for a small application, this is kind of overkill, and you can probably not worry about it.

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!