Jump to content

Separate callbacks for x and y collisions with arcade physics


Recommended Posts

Is it possible to create a separate call back for x and y collisions in Phaser?  I know about Physics.arcade.collide(sprite1, sprite2, callback) but I can't seem to find any info about separating x and y collisions.  I would like my sprites to respond differently to x and y collisions and I can't seem to figure out a way to do it.

For more stripped down libraries, I would typically move all sprites on the x-axis, check for collision, update sprite states, move all sprites on y-axis, check for collision, update sprite states.  Can I / should I do this with Phaser?  Thanks for your help and advice.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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