Jump to content

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


Recommended Posts

 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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