I followed the below example and able to draw custom mesh over Forge Viewer. https://forge.autodesk.com/blog/handling-custom-meshes-selection-along-model-components-forge-viewer
Extending it, I've added TransformControls tool to the custom object selected in handleSingleClick
event;
if (selections.length) {
console.log('Custom meshes selected:')
console.log(selections)
const control = new THREE.TransformControls(this.viewer.impl.camera, this.viewer.impl.canvas, 'translate');
control.attach(selections[0].object);
this.viewer.impl.addOverlay('myOverlay', control);
this.viewer.impl.sceneUpdated(true);
return true
}
Now, when I try to drag the transform tool, the custom object is not moving.
Is my approach to transform my custom object is correct?