I’m trying to make a fighter plane for my game. However, I’m stuck at implementing the wing aerodynamics. My aerodynamics script won’t make my fighter plane fly correctly(It just rolls and drops to the void), and I need some advice on how to make it work properly. Here’s my aerodynamics script:
local tweak=1
local wingsz=script.Parent.wing.Size
game:GetService("RunService").Heartbeat:Connect(function()
local coeff=2*math.pi*math.rad(script.Parent.wing.CFrame.LookVector.X+5)
local lift=coeff*((1.225)*((script.Parent.wing.CFrame:VectorToObjectSpace(script.Parent.wing.Velocity).X*0.28)^2))/2*(wingsz.x*wingsz.z)
script.Parent.wing.thrust.Force=script.Parent.wing.CFrame:VectorToWorldSpace(Vector3.new(0,lift*tweak,0))
end)