Flight Simulator in Unity

I developed a complete six-degree-of-freedom flight simulator using C# and Unity from scratch, to simulate a small aircraft’s dynamics, rapidly design and test flight control and navigation systems, as well as to visualise the results in a simulated 3D environment.

Click here for a video giving a brief overview of the simulator’s features.

Source code is available here: https://github.com/pms67/HadesFCS/tree/master/Flight%20Simulator

5 Replies to “Flight Simulator in Unity”

  1. I downloaded the source code, but my VS2015 couldn’t open it.How do I use it?
    Also, I would like to ask, where is the controller part of this source code?Can n it be controlled by Matlab/Simulink?
    I am not a native English speaker, please forgive me.
    I am a Chinese student, and your work is amazing.


  2. Hi Phil. Thank you for sharing this. I am interested in learning about the math behind a flight simulator. Do you have any suggestions on reference material to read? Specifically, how does the math work in https://github.com/pms67/HadesFCS/blob/master/Flight%20Simulator/UAVSim/Assets/Script/Aircraft.cs

    I love all of your work! Thank you for sharing!


    1. Hi Paul, Thank you for your comment! Effectively I’m using the governing differential equations of an aircraft, discretising them, and solving them numerically via Runge-Kutta integration. I’d recommend the following books to learn more about aircraft dynamics and simulation:
      – “Aircraft Control and Simulation” by Brian L. Stevens, Eric N. Johnson, and Frank L. Lewis
      – “Small Unmanned Aircraft: Theory and Practice” by Randal Beard and Timothy W. McLain
      Hope that helps!


  3. Hi, Philip!

    I’ve downloaded your project, but it seems it is missing the main prefab – UAV.prefab referenced in the main scene.
    Is this intended? Or I’m missing something?

    Thanks!!! 😉 😉

    Mad Max


    1. Same thing here.
      I managed to fix it with creating new prefab with another model and it was good enough.
      But if Philip or anyone has that prefab it would be great.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.