O'Reilly logo

Beginning Math and Physics for Game Programmers by Wendy Stahler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Projectiles

One of the easiest types of motion to spot in a game is projectile motion. Any object that has been thrown, kicked, or shot and that is flying through the air is considered a projectile. Think about the last time you threw a baseball or kicked a soccer ball. What type of path did the ball follow? That's right—it followed a parabolic path! You might want to flip back to Chapter 2, “Geometry Snippets,” for a quick review of the parabola. Check out the parabola that opens downward. Doesn't it look like the trajectory of a missile that's just been shot at an angle? Any first-person or third-person shooter will have tons of projectiles, so how do we model them mathematically?

The easiest way to approach a 2D projectile is to break all ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required