How to update new mesh by changing the original mesh properties in CSG2?

Cylinder Mesh | Babylon.js Playground


//expect  Changing the diameter property of the original Cylinder to modify the new mesh
        // item.mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPointerOverTrigger, item.mesh, "diameter", 1.1, 1));
            // item.mesh.actionManager.registerAction(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPointerOutTrigger, item.mesh, "diameter", 1, 1));


The original mesh has been disposed of, and there is no mapping between attributes for the new mesh. How to change the new mesh through the attributes of the original mesh?

Have a try with csg.toVertexData().applyToMesh(mesh)

1 Like