Hello, as you can see on the screenshot there is a problem with the position of the texture when i use setParts from Phaser.Physics.Matter.Matter.Body, the body and the texture are not at the same place. It works fine only if i declare the body shape at the creation of the sprite like in the screenshot 1.
Screenshot 1:
this.matter.add.sprite(3600, 2400, 'skyship', 'spaceship31', {shape: shapes.spaceship31})
Screenshot 2:
BodyMa.setParts(ships[i].body, ParserMa.parseVertices(shapes["spaceship31"].fixtures[0].vertices))
How can i solve this problem ? or what is the best practice to change the shape of my body without recreating it ?
Thanks.