Jump to content

Drawing on the canvas + collide/physics


Recommended Posts

Hi fellow Phasers!



I'm building a game where you draw on the screen to catch particles. I've got the drawing happening, however the new drawings do not collide with the particles. 


I've extended the 'multiball.js' demo with drawing implemented & attached to give you an idea of what's happening.

Take a look here (and draw on the screen!): http://jsbin.com/laruveni/1/edit?js,output


If I add in the update() function:


game.physics.arcade.collide(drawing, balls, null, reflect, this);


Then the particles collide with the bitmap data canvas (which is the size of the stage), rather than the actual drawing.


Any advice would be appreciated!


Link to comment
Share on other sites


  • Recently Browsing   0 members

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