Since PlayCanvas has only basic types of collision shapes, I got a trouble with mesh-to-mesh collision.
Ammo.js (bullet physics port) has btCompoundShape class, but PlayCanvas has no implementation of that.
So I decided to write a script allows using compound shapes in PlayCanvas.
It’s pretty simple to use:
- Add entities with collision component and rigid body to your main entity.
- Place it where you need
- Add them tag “compound-shape”
- Add script “compound” to your main entity
Now you can collide with meshes: (boxes have mesh collision type)
If you have any suggestions or bug reports, let me know.
I really hope this script would be helpful to someone.