Jump to content
  • Advertisement
Sign in to follow this  
IceCoder

Moving and turning

This topic is 4086 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, I'm new to 3d programming and I would like to know a way to move an object, i.e.: the camera. what algorithms should I use if I want to turn left by 45° and move forward? I believe I should use Sin and Cos, but how?

Share this post


Link to post
Share on other sites
Advertisement
I think it's impossible to get anywhere in 3D programming without understanding the mathematics behind it. Without that, you might be able to muddle your way through and create something that works, but your progress will be slow!

To write even a simple 3D app, you need to understand vectors, matrices and transformations, and it helps immensely if you are able to visualise things in 3 dimensions.

There is a reasonable introduction to transformations here:

http://home10.inet.tele.dk/moelhave/tutors/3d/transformations/transformations.html

The bit specifically about rotation is here:

http://home10.inet.tele.dk/moelhave/tutors/3d/transformations/transformations.html#SECTION0003300000000000000000

There are other tutorials on the web, and plenty of University course lecture notes online, although the lecture notes tend to deal with the subject at a pretty abstract level, whereas you probably want concrete examples. Your best bet is to google a lot with keywords like "3D rotation", "3D transformation".

Share this post


Link to post
Share on other sites
WOooooooooooooooooooooooooo!! It works nicely!!!!


Thank you a lot, I've learnt a lot in this hour!!!

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!