This month in Dimforge #2 (October 2020)

Welcome to the second edition of This month in dimforge! This is the second edition of this newsletter that replaces the This month in rustsim we published before Dimforge was created. This will provide you with a summary of important update that occurred within the dimforge community. This includes in particular updates about the rapier (physics engine), salva (fluid simulation), ncollide (for collision-detection), nalgebra (for linear algebra), and simba (for abstract algebra) crates. This second edition will contain updates for the month of October 2020.

Join us on discord and on our user forum!
You can support us on GitHub sponsors!

Rapier: new shapes, collision filtering, and user-defined data

The new version of Rapier 0.3.0 includes a few important new features:

  • The support of cylinders and cones as collider shapes.
  • The support of collision groups (i.e. bit masks) for deciding what pair of colliders can collide based on some hard-coded rules combining bit masks. These collision groups can also be used for deciding what collider a ray should or shouldn't hit during a ray-cast.
Collision groups demo
  • The support of collision filters (i.e. custom callbacks) for deciding what pair of colliders can collide based on user-defined trait-objects. This can also be used to allow the computation of contacts between two colliders attached to non-dynamic rigid-bodies.
  • The ability to set the mass, center-of-mass, and angular inertia, of a rigid-body at creation time.
  • The support of linear and angular damping for progressively slowing down a rigid-body. This is often used to simulate some sort of air friction.
  • The addition of user-defined data stored into each rigid-bodies and each collider. This user-defined data is specified as a u128 which value can be freely set by the user. This can for example be used to store an Entity identifier from and ECS.

Another notable change is that shapes are no longer represented as an enum. Instead, they are represented as trait-objects. This is a first change towards making it possible to support user-defined shapes for colliders.

You may see the CHANGELOG of Rapier for more details on other changes we made in Rapier 0.3.

bevy_rapier: version 0.4.0

We released the version 0.4.0 of our Bevy plugin for Rapier bevy_rapier. This includes:

  • The use of the latest version of Rapier 0.3 with the addition of an InteractionPairFilters resource that may be modified in order to register user-defined collision pair filters and proximity pair filters.
  • The implementation of rigid-body position interpolation for rendering, thanks to the contribution from Robert Swain. This follows the advices of the popular blog post by Glenn Fiedler:

Salva: work-in-progress integration with Rapier

We started the integration of Rapier with Salva. With the rapier branch of the Salva repository, it is possible to have two-way coupling between Rapier rigid-bodies and Salva fluids. This means that Rapier rigid-bodies with colliders attached will apply forces to fluids they interact with, and fluids with also be able to apply forces to rigid-bodies from Rapier.

This integration will likely be released at the end of November.

What's next

During November, we will mostly focus on:

  1. Adding the support of arbitrary convex polyhedra colliders.
  2. Improving the JavaScript bindings so that they can cover most of the features of the Rust version. Currently, the JavaScript bindings are lacking access to a lot of recently introduced features.
  3. Completing the Rapier/Salva integration.


We would like to thank the whole community and contributors. In particular, thanks to the contributors from the past month1:

Finally, thanks to all the former, current and new supporters through GitHub sponsors! This help is greatly appreciated and allows us to continue working on open-source exclusively.

  1. The list of contributors is automatically generated from the past two months' github commit history. Don't hesitate to let us know if your name should have been mentioned here.