Run fast raycasts and shape overlap queries inside a Unity project.
Build a kinematic character mover that collides and slides along surfaces.
Run the same physics code in headless servers or automated tests outside Unity.
Benchmark collision query speed against Unity's built in PhysX engine.
| tommoore515/box3dunity | codymullins/starling | cross-yanzheng/vocab-roguelike | |
|---|---|---|---|
| Stars | 16 | 16 | 16 |
| Language | C# | C# | C# |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 4/5 | 5/5 | 2/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Only ships prebuilt binaries for Windows x64 and Linux x64, and the native library must match the double precision ABI exactly or it fails to load.
Box3DUnity provides C# bindings and a Unity integration layer for Box3D, a 3D physics engine created by Erin Catto. It is an unofficial project and is not affiliated with the original Box3D project. The package is built against version 0.1.0 of Box3D using its double precision, large world variant, and it ships prebuilt for Windows and Linux, though other platforms are welcome as contributions. Both this package and Box3D itself are released under the MIT license. You can install it through Unity's Package Manager by adding it from a git URL, or by copying the folder directly into your project's Assets or Packages directory. The code is organized into three layers. The first is a raw layer that mirrors Box3D's C functions and structures exactly, so it can be compared directly against the original headers. The second is a friendlier C# API with things like a world object, bodies, shapes, and a character mover for handling collisions and sliding along surfaces. The third is a thin Unity specific layer that converts between Unity's own vector and rotation types and adds a renderer for visually debugging shapes in the editor and in builds. Because the first two layers do not depend on the Unity engine at all, the same code can run in headless servers and automated tests as well as inside Unity itself. The README lists what is currently supported: creating and stepping the physics world, various ray and shape queries, a plane solving helper, creating and moving bodies, basic shapes like spheres, capsules, and box hulls, building meshes from raw triangle data, and a debug drawing system. It also lists what is not yet supported, including joints, contact and sensor events, compound shapes, height fields, building shapes from point clouds, and a recording and replay feature, and it invites contributions to fill those gaps. The project treats Box3D mainly as a fast way to answer collision questions, such as raycasts and shape overlaps, rather than as a full replacement for Unity's own physics engine. It includes a benchmark sample that loads ten thousand identical boxes into both a Box3D world and a Unity PhysX scene and compares how quickly each answers the same batch of queries, checking that both engines return matching results before comparing their speed.
C# bindings and a Unity layer for the Box3D physics engine, used mainly to run fast collision queries like raycasts and shape overlaps.
Mainly C#. The stack also includes C#, Unity, Box3D.
You may freely use, modify, and distribute this software, including for commercial purposes, under the MIT license.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.