Skip to content

Instantly share code, notes, and snippets.

@gingerbeardman
Last active June 8, 2016 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gingerbeardman/797a13a22d8315ffa9fdd222d44523d7 to your computer and use it in GitHub Desktop.
Save gingerbeardman/797a13a22d8315ffa9fdd222d44523d7 to your computer and use it in GitHub Desktop.
Circle-to-Circle collision test using Phaser JS framework
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