2D and 3D physics engine for the Godot game engine.
Godot Rapier Physics is a 2D and 3D physics drop-in replacement for the Godot game engine that adds stability through rapier and fluids through salva.
Creating objects until FPS drops below 30. Running on a macbook m2 pro with Godot 4.2. Everything is run inside the godot editor using the Godot Physics Tests repository.
Each cell shows max shape count. Higher number is better.
Shape | Godot 2D | Godot 3D | Rapier 2D (C++) | Rapier 2D (Rust) | Rapier 3D (Rust) | Jolt 3D |
---|---|---|---|---|---|---|
Sphere | 5000 | 3300 | 8800 | 6200 | 4200 | 8000 |
Box | 3500 | 3200 | 7700 | 5800 | 4000 | 7200 |
Capsule | 4500 | 2700 | 8000 | 5800 | 3700 | 7400 |
Convex Polygon | 3500 | 3100 | 6500 | 4800 | 4000 | 8000 |
TODO run pyramid and joints tests.
This plugin was recently rewritten from C++ to Rust. There are still some things missing from what it had originally and performance is slower than it used to be. This is to be considered beta and still work in progress.
-
Automatic (Recommended): Download the plugin from the official Godot Asset Store using the
AssetLib
tab in Godot: -
Manual: Download the latest github release and move only the
addons
folder into your projectaddons
folder.
After installing, go to Advanced Settings
-> Physics
-> 2D
or 3D
. Change Physics Engine
to Rapier2D
or Rapier3D
.
- SeparationRayShape2D, ConcavePolygonShape3D, HeightMapShape3D, 3D joints.
- Web exports.
- Android exports.
- Double builds.
- Liquids Missing.
- No support for asymetric collisions (eg. object 1 hitting object 2 but object 2 not hitting object 1). More info here Rapier Collision groups and solver groups. This is the exact check rapier does:
(A.layer & B.mask) != 0 && (B.layer & A.mask) != 0
- Friction works differently than it does in Godot. The current formula is: friction is multiplied by other friction, bounce is taken the max value.
- Setting Center of Mass to Custom or Custom Inertia doesn't work right now.
- Windows (x86_64, x86_32)
- macOS (x86-64 + arm64 Universal)
- Linux (x86_64)
- DISABLED Android (x86_64, arm64)
- iOS (arm64)
- DISABLED Web (wasm32)