Loosing half of the Plane when using clipping

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!

:vulcan_salute:

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:

3 Likes

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:

3 Likes

Got it! :wink:

1 Like