Can anybody supply a working example of loading a Jason object of vertices for creating a physics body in phaser3/matterjs? Or more specifically passing the Jason data into this.matter.add.sprite(100,300, ‘this sprite’, {shape: Shapes.the shape})? I’m having a heck of a time with it just trying to create a capsule collider.
Hi, here is a codepen which shows how you can create a matter polygon from an array of vertices.
1 Like