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.
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) ?
I’m not sure what the cameraGUI is used for?
I think you want the GUI to be displayed for the cameraPlayer, so something like this should do it:
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
cameraGUI (meaning, don’t set a
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
It seems to work like that. Thanks @Evgeni_Popov.
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.
It seems to work fine like that. Thank you
I just knew it would be something (simple) like that. I was (very) close to it but still not there yet . Thanks for sorting this out (once again)