Flight simulation algorithms

Hey there

I’m interested in making a unrealistic flight simulation game, thus it doesn’t really need advanced algorithms. If anyone has any tips for me I’d appreciate :slight_smile:

The simplest say seems to be making the aircraft driven by the physics engine and apply forces. Thrust and gravity are straightforward, I just need a good approximation for the lift force. I’m about to test this: (it’s in the direction normal to the plane’s wings and up)

L = constant X velocity^2 X CL
Where CL is the lift coefficient, a function of the angle of attack (I don’t know if I use some expression, a table or unity’s curve thing)

I"ll make some tests :smile:

It kind of worked… It definitely has some wrong angle calculations, resulting in weird behavior when doing fast turns and loops, but other than that I think I’m on the right path :slight_smile:

Arrows or wasd to control and left shift/control to throttle up and down. The annoying cube in the middle of the screen is the velocity indicator, for smooth flights try to not lose sight of it :stuck_out_tongue_winking_eye:

web player

I agree that you’re on the right path. I don’t know if you ever played GTA San Andreas, but the way they did the airplanes is pretty good and I think you get a good simulation if you try to mimic it some way. Maybe add a rudder to bank left and right to make it even more interesting to fly :slight_smile:

thanks :slight_smile: I never played GTA (only the first one, with a top down view) but that sounds like the level of realism I’m after.

I really didn’t expect this to come out so easily. I did a little tweaking and it’s fully functional! You can do loops and all that stuff. I’m considering implementing a more interesting control scheme, right now it’s just torque being applied on the plane, in reality it should change the lift coefficient.