Jump to content
  • Advertisement
Sign in to follow this  
prchakal

Math functions for game

This topic is 2788 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,

Anyone know any resource that contains Math functions to game (2D / 3D)??

Like:
- Object rotation
- Object rotation around other object
- Object look(point) to another object
- Camera rotation
- Moving an object in some directon, like shoots of a shooter game
- and more... the commons functions

Share this post


Link to post
Share on other sites
Advertisement
Start with matrices. Learn how matrices work, cause everything else is based on that.

Then you can find projection matrices, 3D rotation matrices, translation & scale matrices, etc.

Then the camera is just the application of the translation and rotation matrices on the whole scene.

If the camera is at 0,0,-10, than everything else in the scene needs to be moved by 0,0,10. (xyz coords there.)

From there you'll have too look up specific formulas and, if there isn't one off-the-shelf - and there very nearly always is - you should know enough to pull one out of your rear.

Share this post


Link to post
Share on other sites
Hi,

Thanks for responses.

But i think that can exist some tutorials/documents with all you need about this questions.

Like a ALL-IN-ONE about game math.

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!