I have a problem with Forge Viewer when i add a cloned object to scene i can see it, but not select it or make any changes to it.
I have this pseudo-code.
// get first selected Mesh
let selected = Object.values(viewer.impl.selectionMeshes)[0];
// clone it
let clone = selected.clone();
// add it to scene
viewer.impl.scene.add(clone);
// update scene
viewer.impl.sceneUpdated(true);
Did i miss something? Or do i need to make cloned object a part of the model?
You can add custom meshes to Forge Viewer in various ways, for example:
viewer.impl.scene
or viewer.impl.sceneAfter
Note that the first two approaches are typically only used for "overlays", meaning that the meshes don't behave (interact with the viewer) in the same way as the actual loaded model. With the scene builder however the custom meshes can be hovered, selected, etc.