I can't 'dispose' of the whole glb object...a mesh and gizmo are left behind

Hi all, I got snow today…a little diversion during lockdown…nice.

I have another issue with my project…it can be seen here. It’s come a long way, but the problem is I can’t delete the whole glb file: there’s a root and 2 meshes. If you right click on the roof area of the room then green spheres will appear. Click the sphere again and the ‘position gizmo’ shows (would be nice to show without this second click).

Anyway, the main issue is that only the outer mesh of a 2 mesh glb file gets deleted when the bin on the left is clicked (ignore the other buttons). For the sphere to be deleted, it must be selected first (gizmo attached). So how can I get the whole object to disappear when deleting it (including the gizmo).

Help would be appreciated.


Hi, well it is one of those rare occasions where you solve your own problem. :astonished:

I managed to get the sphere to delete (not the gizmo unfortunately).

Here is how I did it, for those who would like to know. I got things to work by making the variable ‘newDevObject’ global. I then noticed that the gizmo manager was targeted with ‘gizmoManager.attachableMeshes.push(newDevObject.rootNodes[0]);’. So, I then changed the dispose code to ‘selectedMesh = newDevObject.rootNodes[0]; selectedMesh.dispose();’.

Thanks to anyone who gave my issue a look.


Maybe @Cedric can help for the gizmo.

Add gizmoManager.attachToMesh(null); and it will remove the gizmo.


Wow Cedric…as simple as that!
Thanks…worked great.

1 Like