From 11b0436a26c8d171fcfdc0f14577775bebf775a2 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Mon, 22 Aug 2016 16:23:22 +0100 Subject: [PATCH] Fixed Arcade Physics Circle body collision, after the #2654 change broke it unintentionally. --- src/physics/arcade/World.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index badf6e327..bcd38e279 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -1158,7 +1158,10 @@ Phaser.Physics.Arcade.prototype = { this.getOverlapX(body1, body2); this.getOverlapY(body1, body2); - var angleCollision = this.angleBetweenCenters(body1, body2); + var dx = body2.center.x - body1.center.x; + var dy = body2.center.y - body1.center.y; + + var angleCollision = Math.atan2(dy, dx); var overlap = 0;