Jump to content

How disable impact


Luiz Bills
 Share

Recommended Posts

I am not sure what you are asking but if you do not want a body to stop when coming into contact with another you can use overlap instead of collide.

 

game.physics.arcade.overlap(sprite1, sprite2)
Link to comment
Share on other sites

You can also disable specific collisions by using the processCallback on collide:

game.physics.arcade.collide(player, obstacles, function(player, obstacle) {  // do something (if you want) when the collision happens (only if the next function returns true however)}, function(player, obstacle) {  // if this function returns false, then the collision does not occur, if it returns true, it does  if (player.isRoundPeg && obstacle.isRoundHole) {    return false;  }  return true;});
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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