From 9bb8003936525614614b60f1f2b019c3ecae2cff Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 6 Jan 2025 18:19:21 +0000 Subject: [PATCH] Fixed incorrect Arcade Physics circle separation logic for circle to circle, and circle to rectangle collisions. The logic was incorrectly moving only one body, even if both could be moved. Fix #6963 --- src/physics/arcade/World.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index afce965555..6b719eb3b3 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -1641,7 +1641,8 @@ var World = new Class({ body1.updateCenter(); } - else if (!body2Immovable || body2.pushable || deadlock) + + if (!body2Immovable || body2.pushable || deadlock) { body2.x += overlapX; body2.y += overlapY; @@ -1664,7 +1665,8 @@ var World = new Class({ body1.updateCenter(); } - else if (!body2Immovable || body2.pushable || deadlock) + + if (!body2Immovable || body2.pushable || deadlock) { body2.x += overlapX; body2.y += overlapY;