Last active
June 8, 2016 22:17
-
-
Save gingerbeardman/797a13a22d8315ffa9fdd222d44523d7 to your computer and use it in GitHub Desktop.
Circle-to-Circle collision test using Phaser JS framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
circleToCircle: function(obj1, obj2) { | |
return game.physics.arcade.distanceBetween(obj1, obj2) < (obj1.body.width/2 + obj2.body.width/2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment