Jump to content
  • Advertisement
Sign in to follow this  
nareshn2003

camera rotation

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

Hi Where can i found good tutorial on camera rotation that similar like arcball (trackball) . Can i do whithout calculating 4D vector ? please sugges me camera rotation tutorial using mouse 2d position for beginner .

Share this post


Link to post
Share on other sites
Advertisement
Hey, are you trying to have a camera rotation around a point (like an orbit)? Or are you trying to make a camera that behaves like a First-Person Shooter? Sorry, I know you gave an example, but I'm not familar with arcball.

Also, are you using DirectX by any chance?

Matt Hughson

Share this post


Link to post
Share on other sites
simply use your friends sin and cos and tan...

Camera.x = sin(ViewDirection*PiOver180)*DistanceFromObject;
Camera.y = cos(ViewDirection*PiOver180)*DistanceFromObject;


tricker with tan I just noticed.. but this ^^ should get you started...

Share this post


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

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