Merge pull request #251 from cocoademon/physics_self_collide_fix

Don’t test self-collisions
This commit is contained in:
Richard Davey
2013-12-26 15:10:28 -08:00
+6 -3
View File
@@ -748,9 +748,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;
}
},
/**