Jump to content

how heavy are impact events really ? (compared to onBeginContact)


valueerror
 Share

Recommended Posts

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 using

a 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

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...