Jump to content
  • Advertisement


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


digiben's camera

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

So im using digibens camera class. and im trying to implement a method to strife the camera. how can this be accomplished? void CCamera::StrifeCamera(float speed) { // this code moves the camera, NOT strife! // but i figured they are closely related! CVector3 vVector=CVector3(0, 0, 0); vVector.x = m_vView.x - m_vPosition.x; vVector.y = m_vView.y - m_vPosition.y; vVector.z = m_vView.z - m_vPosition.z; m_vPosition.x += vVector.x * speed; m_vPosition.z += vVector.z * speed; m_vView.x += vVector.x * speed; m_vView.z += vVector.z * speed; } ~ I am a DirectX to OpenGL convert! ~

Share this post

Link to post
Share on other sites
He''s got a strafing tutorial done up already, right?


If you can''t (or don''t want to) get this file, and if it''s a halfway normal camera, take the cross product of the direction vector and the up vector & move the camera by some multiple of that vector when strafing.


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!