When I use linkWithMesh with multiple cameras, the GUI control is duplicated. One is attached to the mesh and the other is not.
If I remove the linkWithMesh from the control, it works correctly, I only have one GUIConrol display.
You can see the bug on this PG : one button of which is attached to the sphere and another button which appears as the sphere moves. (Another button should not appear.)
Then the attach to mesh button can’t be clicked, and the other one that shouldn’t appear can be clicked. It’s the normally attach to mesh button that should be clickable, not the Duplicate button that shouldn’t exist.
If you disable the link with the mesh, everything is OK.
Interesting. I’ve been trying a couple of things but I believe you DO NOT WANT the button to show in the minimap, do you? It’s all around the layerMasks and attaching cameras. By linking the advancedTexture to the mesh, you actually take that layerMask and I have been unable to dissociate it. So either I can click the button but have no minimap showing (because I would need to add another layerMask to all background scenes meshes) or I have the minimap but I have a duplicate of the button showing in the minimap.
May be @Evgeni_Popov (he might be on vacation, in case, sry to disturb , may be he knows… he probably does… he knows everything about this kind of stuff… and I still don’t, obviously
I tried several things and came to the same conclusion as you.
Yes, I don’t want to show the GUI in the minimap.
Maybe it would take in the parameters of linkWithMesh() an additional option to choose the layerMask as linkWithMesh(mesh, scene, layerMaskUse) ?
The cameraGUI is for displaying only the graphical interface without the post-process impacting the GUI.
If I do this and use blur post-processes, my GUI is also blurry. So I created a camera for the GUI.
Also with your solution it can be seen that the GUI button cannot be clicked
If not, is there a way for the graphical interface not to be impacted by post-processes, which would allow me to get rid of the cameraGUI.
Ok, in that case you should make the GUI render for the cameraGUI camera only, not for both cameraPlayer and cameraGUI (meaning, don’t set a layerMask for cameraPlayer).
And for the GUI element to be displayed at the right location, the cameraGUI should be the same than the cameraPlayer (same position, rotation, etc). The easiest way to do that is to create it with the same parameters than cameraPlayer (ie. make a clone) and to attach it to the canvas so that it moves in the same way than cameraPlayer:
Instead of cloning I made the cameraGUI child of the cameraPLayer. Because the cameraPLayer follows a character/avatar and is an arcRotateCamera. So the cameraGUI which is a freeCamera is attached to the cameraPLayer which is an arcRotateCamera.