How can I use cutting plane?

Is there any way to implement cutting plane? I have no idea at the moment

Hi @sheng_zhong,

Can you elaborate on what you mean exactly?

Like cutting a building model in construction plans? Or something else?

look like this.

Also wondering if there is a way to measure the distance between Model 2 points, which I didn’t find in the tutorial

So, I haven’t seen an example like that in PlayCanvas, I imagine you could do that in a number of ways:

  1. Using a custom shader to discard and pixel rendered above the cutting plane in world space.

  2. Create a new mesh where you discard any vertex points above the cutting plane.

  3. Use a custom camera projection method to set the far plane to the cutting plane (this may not be doable depending on the camera position/rotation).

All solutions aren’t trivial to implement.

1 Like

There’s this example which implements a single cutting plane