Adjust acceleration scale and clamp linear acceleration limits for improved physics simulation
This commit is contained in:
parent
fedb4117b4
commit
3253bebe9c
@ -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
|
||||
|
||||
@ -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()))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user