Join us on Discord Status Status License (3-Clause BSD)

Become a Patron!

2D and 3D real-time physics engine

… for the Rust programming language.

Rigid-body simulations with contacts  
Setup a physics world to simulate rigid solids with external forces and contacts. Includes dynamic, static, and kinematic rigid bodies, as well as colliders for collision detection.
Joint constraints and multibodies  
Constraint the relative motion of two bodies either using forces (with joint constraints) or by reducing their relative degrees of freedom (with multibodies).
Event handling and sensors  
Retrieve collision events to apply logic depending on the interaction between objects. Use a special type of collider,¬†sensors, which won’t interact physically with other objects but will still generate events.
Contact models  
Choose the appropriate contact model to achieve the desired level of accuracy and performances. Are included the Signorini and an approximate Signorini-Coulomb contact models.
Accuracy and performance tuning  
Choose the right compromise between accuracy and performances for your application.
The nphysics testbed  
Setup a physical scene and use the nphysics_testbed2d or nphysics_testbed3d crate to display and interact with it.
WASM compatibility  
Use nphysics on a project expected to run on a web browser.