ihorbra Posted November 6, 2015 Share Posted November 6, 2015 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 More sharing options...
ihorbra Posted November 6, 2015 Author Share Posted November 6, 2015 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 More sharing options...
Recommended Posts