Airplane physics attempt

This is my attempt at creating an airplane physics simulator.
Some details about it:

  • it’s a single script for a single-object-airplane(or glider). That means that an airplane does not consist of many individual objects(left wing, right wing, vertical sabilizer, etc.), but - of one single object.
  • depending on the size and shape of the mesh of the object, there are properties for lift coefficient, drag coefficient and some other constants that are different for every type of airplane.

There are some issues that I need help to fix:

  1. You will notice that i’ve set it up so that when the local-Z(vertical) speed is > 0 then the lift force(Flift) is set to 0, so that the airplane doesn’t go up when it is pointing forward. That results in the airplane “jumping” up at high speeds and minimal pitch-up(result from the huge lift force at high speed).
  2. Airplanes naturally tend to pitch up without pilot control when the lift is pulling them up stronger than gravity. So with 1. set up, the only way to simulate that natural pitch up is setting the pitch torque to increase with lift(at some ratio ofcourse). But that still leaves the “jumping” problem from 1.

Here is the .blend file of my sim:

I’m getting some errors telling me to look at the console when I press alt + P. It says
traceback (most recent call last):
File “”, line 6, in <module>
ImportError: No module named Rasterizer

What version of python are you running, I have 2.6.2

The download includes only a .blend file, do I need a .py script file aswell?

You have to run it in the game engine - move the cursor in the 3d window and press P

It’s fun, cn’t think of nything else to say.

oh… ok, silly me!!!

Just tried it, It’s very good and fun if a little hard to understand the controls.

Thank you for sharing this. It looks and feels pretty nice.

It’s good how more and more people are interesting about flight simulation genre in BGE :slight_smile:


Thank you all for the positive ratings!

But I still think there are some details to be fixed:

  • do I have to let the airplane go up even when it’s flying paralel to the ground, or should I keep it as it is now - when the local-z speed is greater than zero, the lift force becomes zero?
  • at what angle of attack should the airplane stall? Is there an equation for the lift reduction after the stall AOA is passed?

Question about landing gear - is there a way to make the landing gear NOT disbalance the airplane? For example, in real aircraft the landing gear is a lot lighter than the rest of the machine and so it doesn’t noticably shift the overall center of weight. But here it does. I’ve tried setting the mass of every wheel to 0.01(the minimum), but then the wheels start to wobble easily on the ground.


  1. The airfoil/wing with camber generate a lift even in negative AOA. The zero lift can be at -5 fdeg AOA.

  2. The stall happens somewhere between 10-20 AOA. Take a 15 deg.

I’m making a simulator. What you need is equations. I’ve got the Thrust, drag and Lift done and am working on Roll, Yaw and Pitch. I’ll upload soon so that you can see my work and try it.