I am trying to build a character creator using a skinned mesh with various blend shapes made in blender.
The morph targets are working correctly but when i try to update the vertex positions using computeMorphedAttributes, the mesh changes rotation and the verticies end up in the wrong place.
I tried removing the skeleton from the mesh and it stopped rotating it, but it looks like the vertices are being scaled up now.
Before updating vertex positions (what it should look like):
After updating vertex positions (normals are fixed but vertex positions are wrong):
The mesh positions are being updated when the button in the UI is pressed:
botao: function () {
if (mesh) {
mesh.geometry.setAttribute('position', BufferGeometryUtils.computeMorphedAttributes(mesh).morphedPositionAttribute);
mesh.geometry.computeVertexNormals();
}
},