jdnichollsc Posted May 1, 2015 Share Posted May 1, 2015 Hi guys! Exist Overlap or intersects in Phaser with Box2D? I want to know if there is a collision when drop a sprite. Thanks in advance! Link to comment Share on other sites More sharing options...
deniz Posted May 1, 2015 Share Posted May 1, 2015 Hey, You can use sprite.body.setBodyContactCallback to detect collisions. Here is an example: http://phaser.io/examples/v2/box2d/contact-callbacks Hope this helps. Link to comment Share on other sites More sharing options...
jdnichollsc Posted May 1, 2015 Author Share Posted May 1, 2015 Hi deniz, thanks for your quickly response! But, I need only a function that detect overlap in these moment.... exist this? Like in arcade: update : function() { this.game.physics.arcade.overlap(this.player, this.coin, function () { //Code when overlap... }); } Thanks in advance, Nicholls Link to comment Share on other sites More sharing options...
deniz Posted May 1, 2015 Share Posted May 1, 2015 Could you explain to me why body.setBodyContactCallback does not work for you? Link to comment Share on other sites More sharing options...
jdnichollsc Posted May 1, 2015 Author Share Posted May 1, 2015 I just need to know if are overlapping when stopped dragging the object Link to comment Share on other sites More sharing options...
Recommended Posts