From e6ca792f863f34546be4a59083987babf5272cf2 Mon Sep 17 00:00:00 2001 From: itulau Date: Fri, 29 Dec 2023 08:47:56 -0300 Subject: [PATCH] fix rotational drag Correcting the order of parameters when calling `compute_velocity` for `rotational_velocity` fixed an issue with rotational drag having the inverse intended behavior. --- echo/Physics.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/echo/Physics.hx b/echo/Physics.hx index 2276cf8..9a9299f 100644 --- a/echo/Physics.hx +++ b/echo/Physics.hx @@ -52,7 +52,7 @@ class Physics { // Apply Rotational Acceleration, Drag, and Max Velocity var accel_rot = body.torque * body.inverse_mass; - body.rotational_velocity = compute_velocity(body.rotational_velocity, body.rotational_drag, accel_rot, body.max_rotational_velocity, dt); + body.rotational_velocity = compute_velocity(body.rotational_velocity, accel_rot, body.rotational_drag, body.max_rotational_velocity, dt); // Apply Rotational Velocity body.rotation += body.rotational_velocity * dt;