Howdy! To watch this entire Gametutor course please Register  or log in

Math For Games
Calculating Trajectory
Course Description
Understanding how to calculate objects traveling through the air becomes is very important when providing fun and creative gameplay mechanics. In this next Math for Games course, we will walk you through the different techniques of calculating trajectory for projectiles. We will look at how to tackle different components of the trajectory calculation as well as talk about how to use different equations to solve for things like angle of reach and flight time. By the end of this course you will have a solid understanding of the math used to calculate trajectory as well as the code to use in your own game development projects.
Course Details
Difficulty: Intermediate
Total Lessons: 7 Lessons
Running Time: 1:35:37
Date: 11/28/15
Course Files
This is a premium course. Source files are available only to Rockstar and Apprentice members. Please Log In or Upgrade your account to unlock these files.
Locked Source File Icon
File Name:
File Size: 30.05 MB
Complete Unity packages and projects for all course material including project, library, scripts, scene and asset files. If it's in the video it's in the source!
Course Lessons

1. Setting up the Base Script

Lesson 1, Setting up the Base Script
Before we begin to dive into the equations for solving for projectile trajectory, let’s get our base script set up and look at how we will utilize gizmos, to visualize what our math is doing.

2. Calculating the Max Height

Lesson 2, Calculating the Max Height
One of the components to finding the trajectory of a projectile is to figure out how to calculate the max height the projectile will reach before gravity takes hold and sends the projectile back to the ground. Lesson 2 will reveal the math behind this trajectory component.

3. Calculating the Time in Air

Lesson 3, Calculating the Time in Air
Continuing on our exploration of the different formulas we need to understand to calculate trajectory, let’s figure out how to determine how long a projectile is in the air when fired. This will lead us into figuring out where the projectile will land.

4. Calculating Projectile Range - Part 1

Lesson 4, Calculating Projectile Range - Part 1
Now that we know our max height and time in the air of our projectile, let’s see if we can use our formulas, to determine how far the projectile travels, in meters, before landing at its target.

5. Calculating Projectile Range - Part 2

Lesson 5, Calculating Projectile Range - Part 2
Let’s continue with our range calculation and get our final formula in place so we can see how far our projectile will go when launched at a given angle with a given velocity.

Plotting Trajectory Path

Lesson 6, Plotting Trajectory Path
With all of our major trajectory components in place, let’s walk through how we can create a system to actually display the curve of trajectory.

7. Calculating the Angle of Reach

Lesson 7, Calculating the Angle of Reach
With our core formulas in place, let’s take a look at the equation for calculating trajectory if you only know the range and initial velocity.