Archived

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

camera rotation from eye and point

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