Hello again,
I’m playing around with this PG https://www.babylonjs-playground.com/#1WROZH#159 and I am having a problem with layerMasks.
There are two cameras in the scene camera
(with layerMask === 1
) and camera2
(with layerMask === 2
). The activeCamera
of the RenderTargetTexture
is set to camera2
.
If I set the layerMask
of one of the spheres in the scene to 2
, it works as expected (i.e. the sphere is not shown in the main camera [camera
], but it is shown in the minimap [camera2
]). However, if I set the layerMask
of one of the spheres in the scene to 1
, it shows it both in the main scene (where it should be) and in the minimap (where it should not be).
Any ideas of what’s going on? Have I missed some flag for the RenderTargetTexture
perhaps?
Thanks in advance!