diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-12-13 06:00:44 -0500 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-12-13 06:00:44 -0500 |
commit | 417e3bc28c833206546512bc035b8d31ea0fba6c (patch) | |
tree | 26da80579cf8e91ebd833a955f24d4c3df04bbae /src | |
parent | 54d7f8b46e71f67a8d0c08447299aadb0920abe4 (diff) |
fix small bug with sphere on sphere collision
Diffstat (limited to 'src')
-rw-r--r-- | src/physics/physics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |