Jump to content
  • Advertisement

Archived

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

ParityCheck

Want to move my camera in direction of view target

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

I want to know how to move my camera into the direction its facing. My camera can rotate around its position but I''m confused as to what calculations to apply to get my camera to move in the direction where its looking. i.e. if the maera faces up the y axis at the press of my up key it should move forward in that direction as well as in any direction it is facing. any help would be greatly appreciated

Share this post


Link to post
Share on other sites
Advertisement
Store a unit vector that you rotate to the same direction as the camera. When moving the camera, just use the vector for it.
Camera.Position+=DirectionVector sort of.

Share this post


Link to post
Share on other sites
comp.graphics.algorithms Frequently Asked Questions

http://www.faqs.org/faqs/graphics/algorithms-faq/

Subject 5.26: How can I aim a camera in a specific direction?


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!