Gizmo, Multiview and SkyBox

Hello,

[Edit] See the second problem, this one seems to correct after reversing the cameras


I have a problem that I don’t understand. When I create a normal scene everything works, I have the gizmo displayed. But as soon as I create several views, the camera’s Gizmo disappears and does not appear on any view. Then I try to display a Gizmo on an object and it appears on the second seen instead of the first.

Am I doing something wrong or is there a hiding bug ? I commented the code of the PG to explain what is happening

Thanks for your help.

https://www.babylonjs-playground.com/#Z4ZGAY#18

If I reverse the camerasActive like this, it works.
scene.activeCameras.push(camera2);
scene.activeCameras.push(camera1);

But that added another problem to me. If I use a skybox, the second view is no longer displayed.

Even this PG with a skyBox (which prevents the second view)
https://www.babylonjs-playground.com/#Z4ZGAY#19

See this same PG without the SkyBox (which works)
https://www.babylonjs-playground.com/#Z4ZGAY#20

We can see the problem much better here when I create the skyBox after and not before
https://www.babylonjs-playground.com/#Z4ZGAY#21

Adding @cedric to check it when he will be back!

Maybe I could find something to check

So maybe you could create a bug for me on Github?

Ok, I add this on GitHub

Fixed!

1 Like

Yes it works.

I didn’t know about :

gizmoManager.utilityLayer.setRenderCamera(camera1);
cameraGizmo.gizmoLayer.setRenderCamera(camera1);

Cool. Thanks DK

1 Like