Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


camera rotation from eye and point

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

D3DXVECTOR3 rotation = eye - position; D3DXVec3Normalize( &rotation, &rotation ); is this right? if so then how would i move the camera in the direction we are facing currently my code is like this:
//if pressing up
position.x += cos(rotation.x);
position.z += sin(rotation.z);
eye.x += cos(rotation.x);
eye.z += sin(rotation.z);
one of these is wrong, as then i press up it goes pretty much strait no matter where the camera faces.... thanks

Share this post

Link to post
Share on other sites

  • 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!