Intro to Airplane Physics in Unity 3D - 2017 & 2018
4.6 (427 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,557 students enrolled

Intro to Airplane Physics in Unity 3D - 2017 & 2018

Learn how to build your very own Custom Airplane Physics with Unity & C#
4.6 (427 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,557 students enrolled
Created by Indie - Pixel
Last updated 5/2020
English [Auto]
Current price: $69.99 Original price: $99.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 20.5 hours on-demand video
  • 11 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • You will be able to create your own Airplane Physics for your own Flying Games in Unity 3D
  • You will have the confidence to work with Rigidbodies in Unity
  • You will understand the Basics of Weight and Force to produce belivable Aircraft Physics
  • You will understand how to put together a Modular set of scripts to make your Aircraft easy to manage in Unity
  • You will learn how to take advantage of C# inheritance to create Re-Usable code
  • You will Learn how to set up the UI for an Airplane and how to make them functional
Course content
Expand all 149 lectures 20:17:40
+ Introduction
2 lectures 07:03

Lets take a look at the final product that we will get when we finish this entire course!

Preview 02:38
+ Getting Set Up!
5 lectures 47:14

Lets get our Project setup and learn how to use a handy little tool that is included with te Indie-Pixel framework.

Preview 06:43

In order for us to test out our Airplane physics, we need a scene setup to test within.  In this video we are going to set up a scene that is for testing only, but will give us a clean environment to prove our flight physics.

Prepping the Development Scene

In order to begin our Airplane Physics setup, we need to make sure our GameObject structure is in place and our Airplane model is ready to go.

Prepping the Airplane - Part 1

With our Airplane model all setup, our prefab in place, and our GameObject structure completed, lets take a look at setting up the Colliders for our Airplane. 

Prepping the Airplane - Part 2

I always like to take a moment, before I dive into a new Controller and really think about the design of the code.  I rarely just start coding.  So lets walk through the process I use and hopefully itll inspire you and give you some ideas about how to go about designing your code.

Designing the Code
+ Building the Airplane Inputs
11 lectures 01:36:13

Lets discuss what we are going to do in this section and the different items we will cover with regards to user input.


I wanted to show everyone how to install the completed Airplane Physics unity package, that can be downloaded in Lecture 8, into Unity 2018.3.1.

Installing the Completed Project

Now that we have a game plan in place for our Inputs, lets get our scripts stubbed in and ready for coding.

Stubbing in the Scripts

Namespaces and Variables are very important to our coding.  so lets take some time to learn how to use them in our Airplane system.

Keyboard Input - Variables & Namespaces

Properties give us a certain amount of protection from outside scripts accessing data.  So lets see how we can use them to pass the input data around.

Keyboard Input - C# Properties

Virtual methods, in C# are super powerful in that they let you override functional or extend functionality without having to re-write a bunch of code.  Lets take a look at how to use them in our Airplane system!

Keyboard Input - C# Virtual Methods

Unity's Input Manager is our one stop shop for adding custom input mappings.  This is especially important when supporting game controllers.  So lets take a look at working with the Input Manager.  

Keyboard Input - Using the Input Manager

I love creating Editors inside of Unity.  Not only are they fun to make but they are extremely powerful to end users.  Giving them a visual way to interact with the code you created.  It saves production time and repetitive tasks for your production team.  Lets walk through creating a basic inspector editor for our inputs. This will give us a visual display of what our input values look like.

Keyboard Input - Creating an Inspector Editor

Now lets take a look at how we can use our Virtual method in our base input class and override its functionality to support the xbox controls.

Xbox Input - Virtual Methods

Now that we have our Xbox controller input going, lets update the Inspector editor to support this new class.

Xbox Input - Updating the Editor

In order to get our Xbox controls completed, lets add a couple more inputs to our Input Manager in Unity.

Xbox Input - Setting the Input Manager
+ Creating the Airplane Controller Script
6 lectures 54:34

Ok, lets talk about what we are going to learn in this section.


Lets get our scripts stubbed in and understand why we are setting up our scripts the way we are.

Stubbing in the Scripts & Code Design

One of the first glimpses at creating a re-usable system is going to be creating the Base Rigidbody Controller.  This will be a script you can use for just about any Rigidbody Controller inside of Unity.

Creating a Base Rigidbody Controller Class

With our core scripts in place lets continue and create the Airplane controller script.  This will begin to reveal the basics of inheritance in C#.

Creating the Airplane Controller Class

Weight plays a huge factor in Physics.  In order to move a Rigidbody we need to apply a force that counteracts the objects weight.  So knowing the weight of our airplane will help us create a more accurate Physics System.

Airplane Weight Calculation

I love to make my systems easy to use for other people, especially in a production environment.  In this lecture we are going to make it so the Airplane setup is simply created from a single menu option.

Creating a Menu Option for Automatic Setup
+ Building the Airplane Engine Component
6 lectures 56:59

The Airplane Engine is where everything begins in the Physics. In order for a plane to maintain flight it needs speed.  In order to create speed we need power created by an engine and propeller.  Lets quickly go over the topics we are going to cover in this section.


Before we do a deeper dive into creating our engine script, lets learn how to apply forces to a rigidbody.

Applying Forces

Lets get our scripts stubbed in for our Airplane Engine system.

Stub in the Scripts

With everything in place lets hook up the meat of the engine code.

Hook up the Engine

In order for our Airplane to roll on the ground we will need to manipulate the wheel colliders, in Unity, directly.

Handling the Wheels

A great way to allow designers to quickly and easily test out different physics setups, we can create Animation Curves, instead of providing just float values to the Inspector.

Calculating Force with Animation Curves
+ Animating the Propeller
6 lectures 45:00

OK, so lets go over what we are going to learn in this section.


Lets get our Propeller scripts all stubbed in and ready to go for coding.

Stubbing in the Script

In order to rotate our Propeller, we need to know how fast the engine is spinning.  Lets take a look at how to convert RPM's into Degrees Per Second.

Calculating Degrees Per Second from RPM's

Lets have a little fun and learn how to set up the graphics for our Propellers.

Propeller Graphics

A cool old school trick is to blend different blurred propellers based off of the rotation speed.  This gives the propellers a way more realistic look when in flight.

Blending the Propellers

Its always a good idea to learn how to manipulate materials inside of Unity.  It opens a whole new world of FX and tricks that save you time and get the job done.  lets learn how to swap textures in a material.

Material Swapping
+ Flight Characteristics
14 lectures 02:10:52

At the heart of the Airplane system, we have our Flight Characteristics.  Lets take a look at what we are going to learn in this section.


As usual, lets get our scripts stubbed in before coding so we know everything is hook up correctly, from a high level.

Stubbing in the Script

In order for us to be able to calculate lift, drag and many other components of flight physics, we need to know how fast we are going.  So lets take a look at calculating our forward speed.

Calculating Forward Speed

Now that we are on our way to creating a full Physics system, lets take a moment to update our Throttle to a sticky throttle so it mimics more of how a real airplane throttle works.

Sticky Throttle

Lift is the first and one of the most important Forces that acts upon a plane.  So lets take a couple minutes to understand how lift is created in the real world.

Theory of Lift

Now that we have a better understanding of how lift is generated in the real world, lets take a look at how to create it in Unity using Rigidbodies and forces.

Creating Lift

Once again we will employ an Animation Curve property to control our lift power over the amount of speed we are generating from the engine. This makes it easy and visual for Designers to set up new flight models.

Refining Lift with Curves

Drag is a very important force when working with Rigidbodies and Physics in Unity.  This force keeps things relative,ly stable and controllable.  Without it we would simply spin out of control or float off into space.  Lets take a look at how drag is integral to our Airplane Physics.


When flying a plane your angle of attack is very important to the performance of your airplane.  The steeper your angle of attack is the less lift your produce.  Menaing you cant just pull the plane up 90 degrees or it would fall into a spin and possibly end up in the ground.  So lets take a look at how we can further add some realism to our flight physics by incorporating the angle of attack.

Angle of Attack

When working with rigidbodies in Unity,  we almost always want to give more direct control over the final simulation of the physics.  Unity's Rigidbody gives us ways in which we can interact with it almost like directly working with the Transform class.  So lets take a look at that.

Handling the Rigidbody

Pitch is how we get an airplane to go up and down.  Very important in flying a plane.  So lets get our Pitch control in place.


Roll is also very important to flight as it is one of the main ways we get the airplane to turn. Lets get it hooked up in our system.


The rudder of the plane creates a force called Yaw.  It allows us to make small or large direction changes but is used very sparingly when flying a plane.  So lets get it hooked up to our system.


To close out this section we will make the plane turn slightly when we roll.  This will add the final level of realism to our plane that really makes it feel like you are flying a real world airplane.

+ Building the Airplane Camera
4 lectures 31:48

One of the more important components to a controller system, inside of Unity, is the camera.  This is how the player views the world and controls the vehicle.  So lets talk about what we are going to do for our Airplane camera.


Lets get our Camera scripts stubbed in and ready for the code.

Stub in Scripts

To begin our camera system, lets take a look at how to create a basic but useful follow camera.

Preview 14:50

when I was first developing the camera for the Airplane, I noticed that I really needed to have the camera adjust its height when it got closer to the ground.  Mostly when the Airplane was on the ground.  So lets take a look at how to do that.

Ground Height
+ Animating the Control Surfaces
5 lectures 33:52

The control Surfaces of an Airplane determine how the airplane navigates through the air.  Since we have the physics working, lets get our control surfaces working so it looks like the graphical representation of a control surface is actually manipulating the Airplane.


As usual, lets get our Script stubbed in so we know that it is working with the entire system.

Stub in the Script

With our Scripts stubbed in, lets put in the meat of the Control Surface Script.

Coding the Control Surface Script

Now that we have our script all coded up, lets hook up the rudder and test out the scripts modularity!

Hooking up the Rudder

Lets get the ailerons hooked up now and finish out this section! :-)

Preview 05:28
+ Completing the Wheels
4 lectures 28:09

Lets quickly go over the items we are going to cover in this Wheel section.


To add some more realism and control over our Airplane, lets rol and position the wheels according to speed and the Suspension distance.

Rolling and Positiong the Wheels

If we didn't have brakes we would be in real trouble!  So lets learn how to add braking to our wheels.


Steering is also very important, in the sky and on the ground.  Lets learn how to steer our airplane on the ground using the wheel collider.

  • Basic understanding of Unity 3D and how to build simple games with it.
  • Beginning Understanding of C# and the Unity API.
  • Basic Knowledge of using Rigidbodies within Unity.
  • Basic Knowledge of using Unity 3D's UI system
  • Basic Knowledge of Photoshop to Create UI elements.

Have you ever wanted to build your own Airplane Physics using the Rigidbody component in Unity 3D?  Do you want to know more about setting up modular code to make your workflows faster and more re-usable?  If so, this course is for you!  Throughout the contents of this course you will learn how to create a fully functional Airplane Physics model.  

In the course you will learn to build the full physics flight model, how to animate the propeller, how to setup inputs, how to build a dynamic airplane camera, how to animate all the control surfaces of the plane, and more!

By the end of this course you will have your very own Flight Physics System that you can use for your own flying games.

By Purchasing the Course you get the Following:

  • The Complete Airplane Physics Code

  • Two Airplane Models, the Indie-Pixel Plane and the F4U Corsair

  • Complete UI kit to create the Instrument UI for the Airplane

Who this course is for:
  • Anyone interested in creating their own Aircraft physics for games.
  • Someone who is looking to take their Unity skills up a notch and begin to utilize modular code and setups.
  • A Beginner Unity user who wants to learn more about how to create vehicles, specfically aircraft, with Unity's Rigidbodies.
  • A unity user who would like to learn how to create more advanced UI for vehicles