Box3D physics plugin for physics v2

I ported Erin Catto’s new Box3D engine (the 3D successor of Box2D v3: MIT, deterministic, soft-step solver, continuous collision) to a WebAssembly package and wrote an IPhysicsEnginePluginV2 implementation, so it drops in exactly like Havok: scene.enablePhysics(gravity, new Box3DPlugin(true, await Box3D())).

It covers all shape types, thin instances, ball-and-socket / hinge / prismatic / slider / lock / distance constraints with limits and motors, contact and trigger events, ray casts, plus Box3D extras like explosions and wheel joints.

Unit tests and a dev host showcase (5000-box pyramid, ragdolls, a drivable car, a wrecking ball demolition) are in the PR. Not yet covered: 6DoF constraints and the character controller, which is hard-wired to Havok internals.

Is a Box3D plugin welcome in core alongside the existing engine plugins?

If so, I would love to talk about publishing the WASM package under @babylonjs and adding it to the playground runner like Havok.

1 Like

I would recommend it as an extension.

1 Like

Ill look into that structure and check out how to modify the PR to use that pipeline!

1 Like