for one of my projects, ive been making a simple flying air racing flying game. using simple physics…simple rigid body…it works fairly well. As the player plane and AI planes Fly according to the physics and can go around the track. And I can get basic physics right, but just enought to make them fly. and it works pretty well
They get goobered up when they run into each other. But I can fix that. And you really have to fly your butt off to beat them since they are all equal.
So my problem is as I progress through the races I would like to upgrade engine, aerodynamics for less drag.maybe have high or slow speed aircraft. But small changes throw things off in a big way. When i try to make a higher powered plane like a jet class it goes bonkers. I know that there are other sims on here but they have way overcomplicated formulas…I was looking for something simpler to come up with of the simple forces. I think my formulas are way off.
Ive used some formulas that Ive found on the internet and tried to simplify them…Problem is that accelleration is in some of these formulas…such as momentum and momentum as thrust…If my object is moving at a constant velocity, its acceleration is 0…which when multiplied to the rest of the formula makes its momentum 0.
Momentum as Force, to be applied to thrust. Such as a plane with the power cut to 0, but in a dive. It still has momentum and thrust from momentum, because of forward travel. But if its speed is constant. Its accelration is 0. Giving 0 momentum.
Heres some of the formulas im using
Lift is not so much a problem
Lift = forward speed * a factor * a pitch factor. Which i figure is wing area. Adjusted slightly be angle of attack Increases slightly from 1 to 13 degrees, then falls off as pitch increases.
Drag = friction from air resistance basically
drag = abs(1.65 * (own.getLinearVelocity(False) ** 2) * own["drag_coe"]) * (- 1)
Drag_coe is just so I can make adjustments…the 1.65 is supposedly air density at sea level
I apply drag as force to -vector of travel
Inertia = the objects force that makes it want to keep traveling in the same direction
inertia = ((own.getLinearVelocity(False) * (.5 * own.mass)) / 2) * own["interia_multiplier"]
interia muliplier 1.5
I apply internia as a force in direction of travel.
Momentum…Energy stored in the object as moving
momentum = (((abs(own.getLinearVelocity(True)) + abs(own.getLinearVelocity(True)) + abs(own.getLinearVelocity(True))) * own.mass) /2) * own["moment_coe"]
moment_coe is just so i can make adjustments to make it work.
Momentum as thrust:
I just add momentum to thrust.
momentum is applied as thrust in the forward travel direction. Which 0’s out when the aircraft is not accelaring because of the accelarion being multiplied in the formula
Lift is not so much a problem but the others are
I was just wondering if anyone knew where I could get some very, very basic formulas for these forces to use them in blender. It wouldnt have to be perfect. I need to know things also as since I am increasing and decreasing lift according to pitch…should drag and thrust be affected by pitch as well. Very simple formulas is what im looking for.
Thanks for any help you can provide on the subject.