Triangle mesh colliders were limited to static bodies, and CoACD convex
decomposition lived in the MuJoCo backend, where only static meshes could
reach it. Moving bodies with concave shapes had to be approximated by hand.
The core now owns CoACD: prepareConvexParts decomposes, when a world is
built, the triangle meshes a backend selects, once per mesh, and names the
body and collider if one fails; convexParts returns a collider's parts at
its scale. The WASM is imported only when a mesh needs decomposing.
MuJoCo decomposes every triangle mesh except static height grids, and its
Meshes bookkeeping is gone. Rapier keeps real triangle meshes for static
bodies and makes one collider per convex part for moving ones. Meshes not
decomposed at build, added or edited later, use one convex hull in both.
USD exports a moving triangle mesh as physics:approximation
"convexDecomposition" and imports it back.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>