I made an immersive GUI menu attached to a plane. I can toggle ‘edit’ mode by clicking a control button on the GUI. When in ‘edit’ mode, I created a gizmo manager so that I can edit the scene by pointing at other meshes in the scene. The gizmo manager creates bounding box gizmos so that I can move, rotate, scale the selected mesh.
The problem is when I want to interact with the GUI menu again the entire plane is gizmo-fied by the gizmo manager due to the fact that the GUI menu lives on a mesh. I would like to be able to make the gizmo manager ignore the plane or planes that I use to make GUI menus.
Is there an easy way to achieve this?
The gizmo manager API has a way to add attachableMeshes, however I would like the opposite of that, where all the meshes are attachable except for the meshes I provide, like ‘unattachableMeshes’, or ‘ignoreableMeshes’.
Why don’t you just simply filter the array of the meshes you are passing to the attachableMeshes property? Maybe I don’t get something and an example would be cool.
Yes, thank you. I know that would also work. My main hesitation is that I don’t want to maintain that list.
This concern is perhaps more a stylistic or philosophical preference, rather than a technical limitation. To me it is similar to preferring to keep a small list that is a restraining order against one or two people, rather than keeping an inclusive list of all the people on the planet that you are allowed to interact with. I would rather have a “reject list” than an “include list” for my particular scenario.
Thanks for following up! It wasn’t answered here, but I discovered if I need to use my own predicate function / criteria for selecting only certain meshes, it’s best to just disable the automatic selecting meshes using gizmo manager and listen on scene pointer pick and attach gizmo manually. Then I can filter by whatever criteria I want.