From 3253bebe9ca71e7bc2f6b8f0156dc3910eac3954 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 16 Jun 2025 15:33:57 -0500 Subject: [PATCH] Adjust acceleration scale and clamp linear acceleration limits for improved physics simulation --- config/constants.py | 2 +- world/objects.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/constants.py b/config/constants.py index 780dc59..dd40c41 100644 --- a/config/constants.py +++ b/config/constants.py @@ -47,7 +47,7 @@ FOOD_SPAWNING = True RANDOM_SEED = 0 # Vector visualization settings -ACCELERATION_SCALE = 1000 +ACCELERATION_SCALE = 100 VELOCITY_SCALE = 50 ANGULAR_ACCELERATION_SCALE = 50 ARROW_TIP_SIZE = 5 diff --git a/world/objects.py b/world/objects.py index 7bd02d2..0c21242 100644 --- a/world/objects.py +++ b/world/objects.py @@ -302,7 +302,7 @@ class DefaultCell(BaseEntity): # 3. Combine all forces total_linear_accel = output_data["linear_acceleration"] - total_linear_accel = max(-0.1, min(0.02, total_linear_accel)) + total_linear_accel = max(-0.1, min(0.1, total_linear_accel)) # 4. Convert to world coordinates x_component = total_linear_accel * math.cos(math.radians(self.rotation.get_rotation()))