From 05c4522e5ff424c65aab7cd36c7a15313630ac61 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sun, 25 Jul 2021 20:20:10 -0400 Subject: (mkosarek) Fix for wrong timestep --- 2d/_collisions/polygon_polygon/dist/output.wasm | Bin 58079 -> 58262 bytes 2d/_collisions/polygon_polygon/main.cpp | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) (limited to '2d/_collisions') diff --git a/2d/_collisions/polygon_polygon/dist/output.wasm b/2d/_collisions/polygon_polygon/dist/output.wasm index a047d19..055fbb7 100755 Binary files a/2d/_collisions/polygon_polygon/dist/output.wasm and b/2d/_collisions/polygon_polygon/dist/output.wasm differ diff --git a/2d/_collisions/polygon_polygon/main.cpp b/2d/_collisions/polygon_polygon/main.cpp index 620edaa..9cb3eb2 100644 --- a/2d/_collisions/polygon_polygon/main.cpp +++ b/2d/_collisions/polygon_polygon/main.cpp @@ -72,7 +72,7 @@ struct Rigidbody { float32 impulseDtSeconds = nextTimeAppliedSeconds - i.timeAppliedSeconds; Vector2 forceToApply = i.force * (impulseDtSeconds / i.timeOfApplicationSeconds); - force += forceToApply * impulseDtSeconds; + force += forceToApply; i.timeAppliedSeconds = nextTimeAppliedSeconds; -- cgit v1.2.1