• Advertisement
Sign in to follow this  

Knowing How To Know When To Revers Direction Of A Matrix 4x4?

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

OK, I am using the Matrix class from NeHe Lesson 48. This is a bit difficult to make a explanation on what my goal is, but if you have any questions, let me know. What I am trying to do is create a 3rd person camera that works like a flight simulator camera. The problem is if I move the world back to look I am moving forward and wanted to go to point 'B' which is my destination in 'front' of me, and decide to look left and up a bit, my world is going to rotate except for the player model and it will look I am not going to point 'B'! So, how can I change the direction the ship is going to so it still looks I am still going to point 'B' and rotate the ship down a bit so it looks I am looking up a bit and vice versa? [EDIT] The rotation of up and down is already covered, FYI, I figured out a solution for it.

Share this post


Link to post
Share on other sites
Advertisement
This sounds like an issue with the order that you are handling your matrix multiplications in. First off, the view matrix for your camera position and angle should never actually move anything. It should just be stuck on the end of the opengl matrix pipeline for all objects( including the player), and then you readjust your camera position based on the players position in world space each frame.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement