Boolean Operators for Meshes

In the past I often had the requirements to adjust geometries live in PlayCanvas. Unfortunately, PlayCanvas doesn’t offer many possibilities to create and manipulate meshes (or I can’t find the documentation or tutorials).
As a solution I have often been able to work with Bones. However, using Boolean operators would have been much easier than doing the rig setup with all the calculations and also than constructing the mesh. For this reason I would like to propose this as a feature request here.

We have API to create / modify meshes, see the documentation:
https://developer.playcanvas.com/en/api/pc.Mesh.html

But it is pretty low level API that works on vertices and triangles. It’d be nice to have some high level library / integration. You could perhaps try https://github.com/evanw/csg.js/ - use the library to apply boolean operation, and convert resulting polygons to playcanvas mesh.

3 Likes

I’m also interested in the topic. Is this still the way to go?

Yes, external library to modify geometry (if needed), and generates meshes using the Mesh API for rendering.

2 Likes

Pretty old, but still worth checking this out: https://github.com/wei292224644/playcanvas-csg
Someone integrated csg into Playcanvas systems, not sure if it works now, but can give you an idea on how to integrate.

1 Like