I am not sure if this is a bug or not, but I am not able to access the gizmos from the inspector window in order to move/rotate the meshes/transform nodes created in the scene. The current playground contains 2 cameras. The gizmos are accessible only if I dispose off the second camera (guicamera). Can anyone try to test it in this playground? I assume it has to do with layer mask of the two cameras.
Let me hijack this post as Iāve encountered another issue and this is originally my playground I know more about.
1st issue:
As long as the 2nd camera for the advancedTexture of the GUI in the top left is present (as in not disposed), you canāt see nor use the gizmos activated from the inspector. Once disposed everything is working as expected, except if you want to turn the currently active gizmo off again, then you get a TypeError. If you want to rerun the scene youāll then have to refresh the page, otherwise youāll get another TypeError regarding the scene. (The refresh probably resets the clicked gizmos so thatās why it fixes).
2nd issue:
When I tried adding 3D Buttons to my scene they werenāt visible at all untill the 2nd camera was disposed. Now Iām using Button Meshes (which work better for my use case anyway). These are visible but canāt be interacted with as long as the 2nd camera exists. I had a similar picking issue with my pickable cubes, but that was fixed by setting the correct camera for pointers scene.cameraToUseForPointers = camera;. Sadly this doesnāt seem to affect the 3D Buttons.
The 2nd camera is only used because of the default render pipeline otherwise affecting the 2D GUI (as stated in the docs). If there is another way to disregard the pipelines effects for the gui Iāll gladly use that, instead of the hassle of a 2nd camera.
Take a look: https://playground.babylonjs.com/#59FFHD#89
By the way, what should I do about the 2nd camera blocking the picking of my 3D GUI Mesh Buttons? Thatās the only issue left, as Iām not using the default render pipeline anymore, but a post process to change contrast. Apparently with a post process the set camera in the constructor works unlike for the default render pipeline.
This is getting complicated. activeCameras is used for rendering the scene. Any change will break it. especially with Postprocess which brings its batch of issues.
So, activeCamera needs to stay the same.
That brings to the other issue, the gizmomanager from the inspector that gets attached to the last camera in activeCameras array.
The only solution I see is to get the utility layer renderer and set to use camera1 instead of camera2. Is it possible to do so with the debug layer ? @Evgeni_Popov@sebavan
For now I just scapped the 2nd camera altogether, the only issue that leaves is the impact of post processes on the 2D GUI. Since Iām only upping the contrast I can just darken my used colors for the buttons and it looks okay.
Maybe in the future I will use html+css buttons and scrap the babylon 2D GUI altogether.