nothing Posted August 1, 2017 Share Posted August 1, 2017 update(){ game.physics.arcade.overlap(weapon.bullets, platforms, ballHitBrick); } function ballHitBrick() { weapon.killAll(); } Hello, I have problem with this function. This function is activated when the bullet hits the wall, but it's kill all the bullet in the air and I Want to kill only this one bullet what hits the wall. Link to comment Share on other sites More sharing options...
samid737 Posted August 1, 2017 Share Posted August 1, 2017 You can add parameters to your callBack function to do things with the overlapping objects(they are passed as arguments in the same order): update(){ game.physics.arcade.overlap(weapon.bullets, platforms, ballHitBrick); } function ballHitBrick(bullet,platform) { bullet.kill(); } Link to comment Share on other sites More sharing options...
nothing Posted August 1, 2017 Author Share Posted August 1, 2017 Thank you very much. Link to comment Share on other sites More sharing options...
Recommended Posts