MXPain Posted August 15, 2014 Share Posted August 15, 2014 Hi guys, I have not worked ImpactEvents handler prompt in what may be the case:for(var i=0; i<enemies.length; i++) { for(var j=0; j<borders.length; j++) { enemies[i].body.createBodyCallback(borders[j], this.hitEnemy, this); } } game.physics.p2.setImpactEvents(true); hitEnemy: function(body1, body2) { console.log('collide borders with enemy'); }, Link to comment Share on other sites More sharing options...
MXPain Posted August 15, 2014 Author Share Posted August 15, 2014 I removed you have a property - sensor and it worked, it turns out it does not work with sensors? I need to object flew across the border( Link to comment Share on other sites More sharing options...
Recommended Posts