Anvil Physics brings the Box3D solver to Unity as a first-class citizen: one native core, two APIs, and the same deterministic result on every run.
Use it the way your project is built. Drop AnvilBody onto a GameObject and it behaves like a rigid body you already know. Or go wide with DOTS and drive tens of thousands of bodies from Burst-compiled systems. Both paths share the same solver, the same settings asset and the same debugging tools, so a prototype built on GameObjects does not have to be rewritten when it grows into an ECS project.
WHY IT IS FAST
The solver is native C, stepped through Unity's job system with a worker count that matches your machine. Nothing is allocated on the managed heap during a step, so there is no garbage collection spike in the middle of gameplay. Bodies that stop moving go to sleep and stop costing anything at all. On CPUs with AVX2 the contact solver and hull collision handle eight constraints at a time instead of four, picked when the game starts, with results identical to the four-wide path.
Measured on a Ryzen 7 7700X (16 cores), Unity 6000.6.0f1, Anvil 1.2.0, 600 steps after 60 warm-up steps, identical seed, identical 1/60 time step, 4 sub-steps, rendering disabled:
5,000 falling boxes, median step time
- Anvil (DOTS): 1.08 ms
- Anvil (GameObjects): 1.43 ms
- Built-in PhysX: 4.04 ms
- Unity Physics: 4.62 ms
1,000 falling boxes, median step time
- Anvil (DOTS): 0.38 ms
- Anvil (GameObjects): 0.47 ms
- Built-in PhysX: 0.71 ms
- Unity Physics: 1.21 ms
Managed allocations per step: 0 bytes for every engine above.
These are medians, and that choice matters. Anvil puts a settled pile to sleep, so more than a third of the samples in a 600-step run cost almost nothing; averaging them would flatter us. On the same runs the mean for Anvil is 0.78 ms where the median is 1.08 ms, while for Unity Physics the two barely differ. Quoting the mean would buy us a "5x faster" headline that your own measurement would not reproduce. Each figure is also the slower of two runs for Anvil and the faster of two runs for the other engines.
By the median, at 5,000 boxes the DOTS path is 3.7x faster than built-in PhysX and 4.3x faster than Unity Physics; the GameObject path is 2.8x and 3.2x. Sleeping is then a separate win on top of the raw speed: after 371 steps the Anvil pile costs nothing at all, while Unity Physics was still simulating every box and PhysX still had 4,823 of them awake.
At 20,000 boxes the same test gives 6.13 ms on the DOTS path and 7.85 ms on GameObjects, against 17.98 ms for Unity Physics and 22.77 ms for built-in PhysX.
The benchmark that produced these numbers ships with the package, so you can reproduce them on your own hardware instead of taking our word for it. Run Tools > Anvil > Benchmarks, pick the engines and body counts, and the results land in a CSV and a JSON file with your CPU, GPU and Unity version recorded in the header, alongside the seed, the fixed step and the sub-step count, so a run can be compared against another.
WHAT YOU GET
Rigid bodies with box, sphere, capsule, convex hull, mesh and height-field shapes, sized to the object's mesh the moment you add them, and shared physics material assets. Nine kinds of joints, each with a typed handle that reads and changes every setting and measured value while the game runs. Sensors and trigger events. Ray, shape and overlap queries callable from Burst jobs. Contact events carrying impulse and normal, so hit reactions and audio can respond to how hard something actually landed. Debris helpers and explosion impulses for destruction. A collision layer matrix that reads like Unity's own. Wind: one wind velocity on the world, and only the bodies you opt in feel it, so leaves and debris move in a storm while crates and dropped loot stay exactly where they are. Low-level collision and a bounding volume tree that work without a physics world, from Burst jobs too, for hitboxes, custom controllers and your own spatial queries.
GAMEPL
Description sourced from the Unity Asset Store listing.