Help with calculating lift for a plane

So I am trying to create a realistic plane and I am using a body thrust to apply the lift force and thrust force, the problem is that at high speeds the lift produced just shoots the plane high into the sky and if you tilt the plane slightly down (to create a negative angle of attack) then the force is negative and it acts like gravity. Here is my code to calculate the amount of lift generated (the formula for the lift is from nasa’s website)

local LiftCoeffiecient = math.sin(math.rad(plane.MainParts.Engine.CFrame.LookVector.y * 90 * 2))
local Lift = LiftCoeffiecient * 7.38 * ((currentSpeed/2.2) * (currentSpeed/2.2)) * 1/2 * 42.74
--LiftCoeffiecient * Density * Velocity ^ 2 * 1/2 * WingArea
plane.MainParts.Engine.Thrust.Force = Vector3.new(0, Lift, -currentThrottle *  43000)

I’m not sure what to do to fix this problem.

2 Likes

Make sure the units are the same would be my first guess. I’d assume the real equation would be either in the metric or imperial system while ROBLOX units are in studs. Check all of your values to make sure they are in studs.

If it isn’t that my guess would be how you did the calculations. I didn’t test it so I don’t know for sure but double check the multiplication and parenthesis placement.

If it’s none of those then its possible its just that ROBLOX physics aren’t precisely the same as real world physics? Don’t quote me on that heh. Or maybe your plane doesn’t have weight? I’m pretty sure the real lift equation takes weight into account so if it’s only lift then it’s going to go straight up like a rocket.

roblox parts dont have a weight property, the closest thing that you will find is the density and mass.
perhaps using math.abs()?

Lift *= deltaTime

deltaTime is time since last frame

this fixed the airplane launching into the air for me