Hello!
Why is the plane clipped in this PG?
But the box of the same size is not clipped and works as expected? (same PG, just uses a box instead a plane)
Thanks a lot!
Hello!
Why is the plane clipped in this PG?
But the box of the same size is not clipped and works as expected? (same PG, just uses a box instead a plane)
Thanks a lot!
onBeforeBindObservable
is too late in the process, the clip planes have already been setup in the material at that time. You should use onBeforeRenderObservable
instead:
Thank you!
Iād like to ask why is it working for the box but not for the plane?
It is working with the box because as there is a depth (even if very small), the face of the cube which would contain the (0,0,0) point is a little further on the x axis (0.005), so the clipping plane which is in effect when the box is drawn (with (-1,0,0,0) normal) does not clip this face.
If you move the plane further on the X axis you will see it also works with the plane:
Got it!