From 417e3bc28c833206546512bc035b8d31ea0fba6c Mon Sep 17 00:00:00 2001 From: sotech117 Date: Wed, 13 Dec 2023 06:00:44 -0500 Subject: fix small bug with sphere on sphere collision --- src/physics/physics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index a624bc5..6b95bbe 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -19,7 +19,7 @@ bool Physics::checkForSphereCollision(RenderShapeData ¤tShape, RenderShape { currentShape.velocity *= -1.f; // move a little in other direction so it doesn't flip again - currentShape.translation4d = currentShape.velocity; + currentShape.translation4d += currentShape.velocity; } return distance <= radius + radius; -- cgit v1.2.3-70-g09d2