valueerror Posted March 14, 2014 Share Posted March 14, 2014 until the 2 days ago player.body.createGroupCallback(enemyCG, playerDie, this);worked .. also all other forms of collision callbacks worked (body callback, collides, etc) the bodies collide but the callback is never fired.. didn't change a thing.. just phaser 1.2 to 2.0 i read the docs and it seems i've done everything right Link to comment Share on other sites More sharing options...
rich Posted March 14, 2014 Share Posted March 14, 2014 Look at the examples. I added examples for impact events, postbroadphase events AND contact events! Link to comment Share on other sites More sharing options...
valueerror Posted March 14, 2014 Author Share Posted March 14, 2014 thx rich.. im studying the examples right now.. i just can't find the difference.. AND it worked 2 days ago with a clean build from your repo.. there must be some change that interferes with the rest of my code.. all collision work.. just not the callbacks... i even started deleting everything unrelated .. searching and reporting here the moment i found something but if you have any idea what could have changed.. shoot! thx very much! Link to comment Share on other sites More sharing options...
valueerror Posted March 14, 2014 Author Share Posted March 14, 2014 haha.. FOUND IT !! thats new: // Turn on impact events for the world, without this we get no collision callbacks game.physics.p2.setImpactEvents(true); Link to comment Share on other sites More sharing options...
rich Posted March 14, 2014 Share Posted March 14, 2014 Yes impact events are expensive, so I disable them by default begin and end contact are much cheaper, so use those where possible really. kctang 1 Link to comment Share on other sites More sharing options...
Recommended Posts