TheBlackSword Posted May 11, 2016 Share Posted May 11, 2016 Quick question about the overlap function. Does it only return as true when the two bodies initially overlap and not after, even if they still overlap? Or does it return as true during the entire duration of the overlap? My test code indicates the former, but maybe I'm doing something wrong. if(game.physics.arcade.overlap(this.enemySprite, player_sprite)) { game.debug.text('enemy and player overlap', 10, 10); } else { game.debug.text('enemy and player do not overlap', 10, 10); } Practical application is that I have bullets randomly passing through enemies, and I thought this was one possible explanation. Link to comment Share on other sites More sharing options...
rich Posted May 11, 2016 Share Posted May 11, 2016 Actually it's just a bug in 2.4.7, but has since been fixed in the dev branch version of Phaser (and will be in 2.4.8) Link to comment Share on other sites More sharing options...
TheBlackSword Posted May 12, 2016 Author Share Posted May 12, 2016 Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts