My Tutorial for Using Trig In Game Development
Posted: Fri Sep 03, 2010 10:21 pm
Hey, I remember before when I first tried making a top down game I had no damn clue on how to get the bullets to move towards my mouse. I was so desperate that I literally made about 50 if statements that checked for the mouse position (yeah, I had a lot of time on my hands). Then I learned about this magical unit circle and trig functions
I learned these functions in my math class, but luckly I'm an awesome dude and I made a tutorial which I personally think explained it well. But then again I know the topic so...
Anyway, the video is here: http://www.youtube.com/watch?v=FmWDD9AXUEQ
This tutorial uses images and displays I drew out for hopefully easy learning. Also I'm not giving you the code on how to make a bullet move in that direction. I'm teaching you how to use a very important function to get the way it should move. I don't know what library you use or what everyone's code looks like so I can't just say "Type bullet.move(atan2(blah))" because that wouldn't work for everyone, not even mine

I learned these functions in my math class, but luckly I'm an awesome dude and I made a tutorial which I personally think explained it well. But then again I know the topic so...
Anyway, the video is here: http://www.youtube.com/watch?v=FmWDD9AXUEQ
This tutorial uses images and displays I drew out for hopefully easy learning. Also I'm not giving you the code on how to make a bullet move in that direction. I'm teaching you how to use a very important function to get the way it should move. I don't know what library you use or what everyone's code looks like so I can't just say "Type bullet.move(atan2(blah))" because that wouldn't work for everyone, not even mine
