Jump to content

phaser physics matter setOnCollide callback does not start


4promile
 Share

Recommended Posts

let object1 = this.matter.add.sprite(150, 150, "image1", false, { shape:{ type: "circle", radius: 50 } } )

let object2 = this.matter.add.sprite(350, 150, "image2", false, { shape:{ type: "fromVerts", verts:"0 5 75 1 106 6 121 12 132 25 132 35 50 37 55 20 8 18" } } )

object1.setOnCollide( ()=>console.log('test callback object 1') )

object2.setOnCollide( ()=>console.log('test callback object 2') )

When these two objects collide (not only with each other, with all the objects on the stage), callback function from the object2 with the body shape type "fromVerts" does not start, callback the other shape types (for example "circle") work correctly, why body shape type "fromVerts" setOnCollide callback not start?

(sorry for my english:)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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