2x4b Posted December 20, 2017 Share Posted December 20, 2017 I am using the advancedTexture GUI to make some controls in a scene. In the full scene, I am using the layerMask to separate objects between the main camera and the minimap. The layerMask does not appear to be respected for GUI components. This playground has the ground plane and the button in the same layerMask(2). the ground plane is not rendered, but the button is. This is not what I expected. Is it correct? https://www.babylonjs-playground.com/#B5ED05 Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted December 20, 2017 Share Posted December 20, 2017 Hi @2x4b GUI doesn't support layerMask, The ground is not rendered because your camera only renders layerMask 1 camera.layerMask = 1; Quote Link to comment Share on other sites More sharing options...
2x4b Posted December 20, 2017 Author Share Posted December 20, 2017 Ok, so the GUI doesn't support layerMasks. Is there another way to achieve the same effect that you're aware of? Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted December 20, 2017 Share Posted December 20, 2017 Hi again @2x4b Could you describe your goal further? i'm not sure i understand what it is you want to do Quote Link to comment Share on other sites More sharing options...
2x4b Posted December 20, 2017 Author Share Posted December 20, 2017 I want to remove the GUI from the second camera I am using in my scene. I have a Point Of Interest App that I am building. On each point I have a mesh that is connected to a button through the GUI. i want to hide the meshes in the main camera, and hide the GUI elements in the minimap camera. I was using 2 meshes and layerMasks, one mesh for each camera, but The button meshes weren't as clear as I would have liked, so I changed the setup. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 20, 2017 Share Posted December 20, 2017 Hello if you are using GUI in mesh mode then just apply layer mask to your mesh If you are using GUI in fullscreen mode, unfortunately the layer will always be applied at the end Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.