From here, I’d like to put that masking plane on a different layerMask, rendered by a second camera which doesn’t have any rotation inputs. For some reason the original plane goes missing https://playground.babylonjs.com/#QMWDSY
I found a very interesting thread here, there were a lot of interesting ideas, viewport, adding scenes etc but I’d like to keep it within the layerMask and rendering Groups if possible.
Thanks but this is not working, it is now displaying 4 planes where 2 are still and 2 are moving.
What I meant is that 1 plane (the small black one) can rotate with camera 1 but it is masked by a second plane (the wider grey one) which is on a different layerMask, same as camera 2 which is not moving.
@wannax ah not sure about that then, maybe one of gurus here will be able to help you in that, for masking I usually go with simple tricks rather than layerMask, like here https://playground.babylonjs.com/#QMWDSY#4
Yep, with 1 camera only and no layerMask I was able to make it work as well, the problem comes when there are 2 cameras and the masking object is on a different layerMask
I found a workaround as it was impossible to make it work with layerMasks and two different cameras in case anyone will need something similar to this.
The idea is to only use 1 camera but then parent the masking plane to the camera, that way the plane won’t seem to be moving whereas the scene will still be moving inside the masking area.
Although it is not really the solution to my initial question I will mark it as the solution hoping this might help someone in future