Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

setPostBroadphaseCallback doesn't work correct


ihorbra
 Share

Recommended Posts

Video of issue: https://www.dropbox.com/s/td88t29bxq7jwqk/Phaser-wrong-overlaping.mov?dl=0

 

Background should change when zone and gift are overlapped but setPostBroadphaseCallback fire event on wrong time. I think It happens maybe because zone looks like a rectangle...

 

This is code for the video you see above: http://paste.ofcode.org/QE7KjbDy4bXLLYNQDKDDnY

Link to comment
Share on other sites

Already solved. 

 

Now using `sensor` and onBeginContact

// set the green pepper to overlap, rather than collideif(veg.frame==4) {    veg.body.data.shapes[0].sensor=true} // we can check overlap "collision" with the green pepper sensor as well as normal collision with the other veggies nowship.body.onBeginContact.add(shipCollision, this)
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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