zajca Posted July 23, 2015 Share Posted July 23, 2015 Hi, I'm looking for way how to check distance between two sprites based on their borders not anchors. update: function(){ var self = this; if(this.dragging){ this.tileGroup.forEach(function(tile){ var distance = self.game.physics.arcade.distanceBetween(self.draggedTile, tile); if ( distance < 85 && distance > 75 ) { console.log(distance); } }); } }this will check distance between anchors of dragged tile and other tiles but not based on their shape. Link to comment Share on other sites More sharing options...
Recommended Posts