Skip to content

Commit d397551

Browse files
authored
Merge pull request phaserjs#5391 from samme/fix/overlapR
Set Arcade.Body#overlapR in separateCircle()
2 parents ca8f201 + 956f880 commit d397551

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/physics/arcade/World.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,9 @@ var World = new Class({
15211521
overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y);
15221522
}
15231523

1524+
body1.overlapR = overlap;
1525+
body2.overlapR = overlap;
1526+
15241527
// Can't separate two immovable bodies, or a body with its own custom separation logic
15251528
if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX)
15261529
{

0 commit comments

Comments
 (0)