How can I update Vertices?
var json = this.scene.cache.json.get('playerData');
for(var i = json.skins[0].attachments.root.root.vertexCount * 2-1; i > 0; i-=2) {
this.vertices.push({x: json.skins[0].attachments.root.root.vertices[i] / 2.5, y: json.skins[0].attachments.root.root.vertices[i-1] / 2.5});
}
this.vertices = this.scene.matter.verts.create(this.vertices);
this.physics = this.scene.matter.add.fromVertices(this.x, this.y, this.vertices, {}, false);
I can create vertices sample code style but I can’t update vertices. How can I do?
Thanks.