Don’t test self-collisions

This commit is contained in:
Cameron Foale
2013-12-05 16:26:03 +11:00
parent 666df67453
commit b48669dded
+6 -3
View File
@@ -750,9 +750,12 @@ Phaser.Physics.Arcade.prototype = {
* @returns {boolean} Returns true if the bodies were separated, otherwise false.
*/
separate: function (body1, body2) {
this._result = (this.separateX(body1, body2) || this.separateY(body1, body2));
if(body1 !== body2)
{
this._result = (this.separateX(body1, body2) || this.separateY(body1, body2));
} else {
this._result = false;
}
},
/**