valueerror Posted September 29, 2014 Share Posted September 29, 2014 game.physics.p2.setImpactEvents(true); player.body.createGroupCallback(enemyGroundCG, playerCollision, this);this is what i use most of the time but i've heard that usinga onBeginContact event is not that much expensive.. to gain some FPS - is it really useful to change the impact handling? does this really matter? Link to comment Share on other sites More sharing options...
valueerror Posted October 1, 2014 Author Share Posted October 1, 2014 so i gave it a try.. i disabled impact events and changed everything to onBeginContact events.. well .. it looks like the bottleneck in my game is somewhereelse.. i didn't notice a thing ! maybe the difference just doesn't matter if you only have 4 types of collision groups and you do the individual checking with some "if statements" like (if body2.sprite.name === 'tux' do this elseif body2.sprite.name === cow do that) Link to comment Share on other sites More sharing options...
Recommended Posts