Problem with airplane

Hey, I just joined the site and need a few questions awnsered about a game i am working on first:
In the game you control an airplane but I can not figure out how to make the plane rotate slightly and then level back out after you stop turning but instead it turns like a car any help?

Then second:
After you fly for a minute the plane kind of stalls and then hits the ground and I cant just make it fly continuosly any help with this?

Note: I have physics enabled should i turn it off and just enable collisions?

            - Avenger

Please either post a .blend or tell us more of your setup. If not it is very difficult to help you. Aircraft physics are very complicated, and depending on the level of realism you want to achieve it is necessary to use python. In other game engines I have made aircraft simulator’s.

There are five main forces that act upon a plane. Drag, Thrust, Lift, and Gravity. Then the more uncommon one is AOA. (Angle of Attack) However AOA is also involved with lift.

  1. Drag - If you are using just a standard physics bound object, the GE does not take into account air resistance. THis is because it is usually insignificant. However at high speeds, it is so in python you would need some thing like: speed = speed * 0.95 #Gives you a decent deceleration over time.
    Note that the above method would only work if you were altering it’s location directly. If you were changing the location using force, you would have to apply some negative force. (Unless there is a way to apply friction that I do not know of)

  2. Thrust - Just alter the location directly with location, or force. Depending on wich ever one you liked better for drag.

  3. Lift/AOA - When an aircraft is flying with it’s orientation (rotation) parallel to the ground, (Assuming the ground is flat) it is still moving up because of lift. There have been many calculation’s for lift vs. varying angles, so luckily you can use someone else’s. Link #1. Link #2.

  4. Gravity - if you implented everything else correctly, and your airplane is to scale, you should just be able to use the GE’s default system.

Link -Roll Yaw Pitch Flight Dynamics
Then, You also mentioned that the airplane tends to turn like a car. An aircraft can turn one of two ways. It can change the Yaw (like a car turns) very slightly with a flap on the tailfin. The more common (And effective) way to turn though is to ROLL to the side slightly, then change the PITCH. IF you have ever ridden on an airplane you have felt the plane do this. So that would fix your turning problem.

Now for correcting the roll of the airplane. I’m assuming you mean that if the player rolled to the side, when he release the key, you want the airplane to turn upright. this is very simple actually with python.roll = roll * .98

Again, like the deceleration one play around with this to find the best value.

You can see how it is necessary to use python if you want advanced aircraft physics. IF I were coding this, I would have 6 variables. (Roll, Yaw, Pitch, Speed) Then assign these to their respictive values.

I hope that Helps!

ok I will try this tyvm :smiley: I will post a .blend later I am at school so i dont have much time I will get back on when I get home

Here is the .blend

the controlls are:

tilt down: w
tilt up: s
turn left: a
turn right: d
roll left: left arrow key
roll right: right arrow key

oh and I am not using python I am just using the simple logic blocks

(p.s. the game is not very realistic as you can see in the .blend)


airplane game.blend (866 KB)

You just are not going to be able to get anything realistic “movement wise” without some python. There are too many factors in the physics of flight to accurately make them with logic bricks.

Hello Avenger,

After the blender artists forum searching I figured out, there’s no aerodynamic & physic equations based flight recourse available in public.

So, I have been trying to solve this flight model or flight dynamics model problem for the BGE since August.

My FDM4BGE (flight dynamics model for blender game engine) public project:

Because the aerodynamic physics seems to be a never ending equation swamp, I decided to set my target to the simple and generic flight dynamics model with as basic equations as possible. The project is ongoing.

Feel free to use & develop the FDM4BGE files at will. Please, share the results. Thanks.

thanks I will check out your project and see if we can find a solution to this. tyvm everyone