I had been reading the user manual for Bullet 2.8.3, but the manual for 2.8.2 (found here at the time of writing) says the same on this topic: Bullet has support for mesh-mesh collisions using the gimpact algorithm. However, btGimpactTriangleMeshShape (see figure 1 below) is missing from ammo.idl, suggesting that this is one of the features in Bullet that are currently not also in ammo.js, unfortunately.
PlayCanvas 1.22.0 (and probably other versions) is incompatible with builds of ammo.js newer than commit a96e001 from April 12 2017 where an async initialization API was introduced to ammo.js, so that instead of calling Ammo.x ... you need to do Ammo().then(ammo => ammo.x ...).
This engine patch you mention, do you suggest submitting it as a pull request to the PlayCanvas repo?
So, is the wasm version included not a full fork of Ammo.js? I’m really interested in mesh-mesh collision, but I suppose it could be done another way. I’m working on a physics based dice roller that adds random torque to the dice and its coming along despite some errors I made modeling (setting the origin of the model affects the physics, by placing them above the origin, I set the “center of gravity” to always land baked side up.) So, it works pretty well except for mesh-mesh collisions will sometimes pass through each other or more troubling land through each other. So, I was going to write a script this morning to test collisions and realizing that might be more trouble than dynamically setting the collision shape to a box after they stop moving, and then applying a little opposite force.
In my case I was just trying to make sure the dice don’t land overlapped, which you can achieve with a square trigger volume as the child, just a little smaller than the model, then check the event body for isStatic. Thanks for the help.