Just want to quickly introduce myself, since this is my first post… I’m a 3D artist with around 10 years of experience in the game industry who’s been messing around with programming and scripting in my free time, wanting to do some game project for fun and who knows what else.
I’ve been struggling with some of the math behind games in general (as I believe most of us artist types do :)). Specially when it comes to trigonometry. I cannot figure out the concept behind the sin and cos functions. Of course I could just copy paste pieces of code to get what I want, but I do believe that a deeper understanding would greatly help me in the long term.
I would greatly appreciate if some of the math geniuses in the game industry could give me a hand with this. I’m looking for some kind of explanation for the trigonometry functions with practical examples of their uses in games.
Anyways, I’m glad to have found Unity and their community… you guys rock.
There are some really decent books out there on this topic. When it comes to math, understanding the principles is essential because you won’t learn that from code; code will just help demonstrate those principles and build your confidence in understanding them.
If you’re just asking what sin and cos are used for, the simple answer is to rotate things. You decide what angle you want to rotate things, and the sin/cos functions will tell you, based on the angle, where the thing should go when rotated.
The branch of mathematics that is applied to 3D geometry and rendering engines is called Linear Algebra.
A great, free resource for you to learn linear algebra. If you master that book, you’ll be calculating rotations, projections and translations like no one’s business. Note that linear algebra, in technicality, only requires you to know the functions of add, divide and multiply along with basic mathematical properties. It can, however, become a very challenging subject to learn.