how to make / scripting flight sim?

I got a project from my teacher to make flight sim.
And I am already make model f-22 raptor aircraft.
Can somebody teach me how to make flight sim from takeoff until it landing (include rotate and etc)?
I’m searching from google and I can’t find reference to make it until now.
Please help me

I really need a help.

I would use rigid bodies and forces for most of it, and then use python to control the angles of the flaps/rudder and the throttle is easy enough in logic, lift can be done by adjusting a force the faster the craft goes, from 0 lift at 0 to 9.8* weight of the craft above stall speed, with python

need some help from here?

Here I have a little helicopter/airplane hybrid prototype.

It is a pretty simple script based on using forces to provide movement.

import bge
from math import pow, sqrt
from mathutils import Vector

def main():
    cont = bge.logic.getCurrentController()
    heli = cont.owner
    vel = heli.getLinearVelocity(False)
    powxyz = pow(vel.x,2) + pow(vel.y,2) + pow(vel.z,2)
    speed = sqrt(powxyz)
    force = k*speed
    vecx = Vector((1,0,0))
    heli.applyForce(k*-vel, False)
    heli.applyForce(force*vecx, True)
    keyboard = bge.logic.keyboard
    wKey = bge.logic.KX_INPUT_ACTIVE ==[]
    sKey = bge.logic.KX_INPUT_ACTIVE ==[]
    aKey = bge.logic.KX_INPUT_ACTIVE ==[]
    dKey = bge.logic.KX_INPUT_ACTIVE ==[]
    upKey = bge.logic.KX_INPUT_ACTIVE ==[]    
    downKey = bge.logic.KX_INPUT_ACTIVE ==[]
    leftKey = bge.logic.KX_INPUT_ACTIVE ==[]        
    rightKey = bge.logic.KX_INPUT_ACTIVE ==[]
    mov = 0.1
    if wKey:
        heli.applyForce((20,0,3), True)
    if sKey:
        heli.applyForce((0,0,-3), True)
    if aKey:
        heli.applyTorque((0,0,.5), True)
    if dKey:
        heli.applyTorque((0,0,-.5), True)
    if upKey:
        heli.applyTorque((0,.5,0), True)
    if downKey:
        heli.applyTorque((0,-.5,0), True)
    if leftKey:
        heli.applyTorque((-2,0,0), True)
    if rightKey:
        heli.applyTorque((2,0,0), True)


Here is a rig I have worked out,

it still needs mouse control but otherwise wala :slight_smile:


Jet.blend (1.05 MB)

update :More moreness

yes sir, more reference are good
please, I beg you sir

Thank you sir, its really helpful :slight_smile:

Thank you sir, btw can you help me more for controlling using joystick?
my teacher order me using joystick handle
I got joystick Logitech extreme 3D pro in my home



Re: Help abit more about flight simStart with your “thrust” logic


Thrust integer

Keyboard Pullup ----------------------------------------------------------------------and-----------------motion y axis AngleV .5 (local)
Keyboard Dive ----------------------------------------------------------------------and--------------------motion y axis AngleV -.5(local)
Keyboard Right ----------------------------------------------------------------------and-------------------motion Z axis AngleV .5 world
Keyboard Left ----------------------------------------------------------------------and-------------------motion Z axis AngleV -.5 world
Keyboard Throttle_UP-------------------------------------------------------------and-----------------------property Add 1 to thrust
(property interval) thrust Min=0 (Max =(1 less then max thrust)-/

Keyboard Thrust_Dwn-----------------------------------------------------------and---------------------property Add -1 to thrust
(property interval) thrust Min=1 Max = max thrust--------------------/

Always--------------------------------Python -Lift Code

import bge

def main():

cont = bge.logic.getCurrentController()
own = cont.owner
Thrust = own[‘thrust’]
sens = cont.sensors[‘Always’]
actu = cont.actuators[‘Motion’]
Speed0 = own.getLinearVelocity(0)
Speed0.z = Speed0.z0
speed2 = Speed0.length
if sens.positive:



It’s work sir!
But, something happen when my handle on free position (not move or original position) after i use this script
Joystick | Axis | Up Axis (keyboard dive) ----------------------------------------------------------------------and--------------------motion y axis AngleV -.5(local)
It’s keep move diving, not on position moving straight
what is the problem?