summaryrefslogtreecommitdiff
path: root/2d/rigidbody/rigidbody_2
diff options
context:
space:
mode:
Diffstat (limited to '2d/rigidbody/rigidbody_2')
-rwxr-xr-x2d/rigidbody/rigidbody_2/dist/output.wasmbin50226 -> 50452 bytes
-rw-r--r--2d/rigidbody/rigidbody_2/main.cpp2
2 files changed, 1 insertions, 1 deletions
diff --git a/2d/rigidbody/rigidbody_2/dist/output.wasm b/2d/rigidbody/rigidbody_2/dist/output.wasm
index 29c319a..fb79e45 100755
--- a/2d/rigidbody/rigidbody_2/dist/output.wasm
+++ b/2d/rigidbody/rigidbody_2/dist/output.wasm
Binary files differ
diff --git a/2d/rigidbody/rigidbody_2/main.cpp b/2d/rigidbody/rigidbody_2/main.cpp
index 123cf7e..44a3c53 100644
--- a/2d/rigidbody/rigidbody_2/main.cpp
+++ b/2d/rigidbody/rigidbody_2/main.cpp
@@ -69,7 +69,7 @@ struct Rigidbody {
float32 impulseDtSeconds = nextTimeAppliedSeconds - i.timeAppliedSeconds;
Vector2 forceToApply = i.force * (impulseDtSeconds / i.timeOfApplicationSeconds);
- force += forceToApply * impulseDtSeconds;
+ force += forceToApply;
// New! Increment the torque for each force
torque += i.pointOfApplication.getPerp().dot(forceToApply);