How to add a utilityLayer on a GizmoManager?
Each Gizmo Manager are already using their own utility layer, what are you trying to achieve ?
I would like to change the utility layer of a GizmoManager
Could you detail a bit why ? I am wondering if it is the right approach ?
I have a react application which has two canvas, when I click on an object(1st canvas) the rotation gizmo appears as expected, however, when I click on an object(2nd canvas), the rotation gizmo appears in the first canvas instead of the second.
When debugging, I noticed that the GizmoManager._…utilityLayer.originalScene of the second Canvas/Scene was pointing to the first scene, hence causing the problem.
I could solve the issue by using a RotationGizmo instead of a GizmoManager.
I add different utilityLayers in each RotationGizmo(one gizmo per scene/canvas).
Nonetheless, I wonder if we could change the utilityLayer for a GizmoManager?
This is extremely weird and looks like a bug to me do you have one GizmoManager per scene and could you share a repro ???
It might be a bug, I think is hard to reproduce in a playground, maybe on a codesandbox, but it will take a while, not sure to have enough time.
A github link to your project ???
It’s a private repo, don’t have the permissions to share.
I think to replicate one needs two add two canvas with two different scenes.
In each scene add a Sphere with a gizmoManager (different spheres and gizmos for each scene).
On a sphere click, attach the correspondent gizmo.
Check that the gizmos only appears in one of the canvas.