Mesh get vertices world position

Hy I am trying to get the world position of my mesh vertices, is there an easier way to do that?

const mesh = scene.add.mesh(window.innerWidth/2, window.innerHeight/2, texture);

    mesh.addVertices(this.vertices, this.uvs, this.indicies);

    mesh.panZ(7);

    mesh.ignoreDirtyCache = true;

    // mesh.vertices[2].x += 1

    // mesh.vertices[5].x += 1

    console.log(mesh.vertices)

    // for(let i = 0; i<this.vertices.length/2; i++){

    // var control = scene.add.circle(this.vertices[i * 2] * 9, this.vertices[i * 2 + 1] * 9, 40, 0xff00ff)//.setData('vertex', {x: this.vertices[i * 2], y: this.vertices[i * 2 + 1]});

    // control.setInteractive();

    // }

:wave:

See final drawn vertex position in Mesh#setDebug().

1 Like