Skip to content

Commit a5a56b2

Browse files
committed
Fix #7054. Arcade physics circle game objects can be made immovable when colliding with rectangular game objects.
1 parent 6b45676 commit a5a56b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/physics/arcade/World.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1660,15 +1660,15 @@ var World = new Class({
16601660
// We'll only move the circle (if we can) and let
16611661
// the runSeparation handle the rectangle
16621662

1663-
if (!body1Immovable || body1.pushable || deadlock)
1663+
if (!body1Immovable && (body1.pushable || deadlock))
16641664
{
16651665
body1.x -= overlapX;
16661666
body1.y -= overlapY;
16671667

16681668
body1.updateCenter();
16691669
}
16701670

1671-
if (!body2Immovable || body2.pushable || deadlock)
1671+
if (!body2Immovable && (body2.pushable || deadlock))
16721672
{
16731673
body2.x += overlapX;
16741674
body2.y += overlapY;

0 commit comments

Comments
 (0)