From f15ab478422769b910cb12eeb2b873d4362b5934 Mon Sep 17 00:00:00 2001 From: Titan Yuan Date: Fri, 27 Sep 2024 10:50:50 -0700 Subject: [PATCH] Calculate lift-induced drag from gravity --- Assets/Scripts/Interceptor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Interceptor.cs b/Assets/Scripts/Interceptor.cs index cffcf84..71ba687 100644 --- a/Assets/Scripts/Interceptor.cs +++ b/Assets/Scripts/Interceptor.cs @@ -62,7 +62,7 @@ public class Interceptor : Agent { } float airDrag = CalculateDrag(); - float liftInducedDrag = CalculateLiftInducedDrag(accelerationInput); + float liftInducedDrag = CalculateLiftInducedDrag(accelerationInput + gravity); float dragAcceleration = -(airDrag + liftInducedDrag); // Project the drag acceleration onto the forward direction