Skip to content

Conversation

@cb341
Copy link
Owner

@cb341 cb341 commented Feb 2, 2026

Rapier → Avian

bevy_firework Is a wonderful crate.
I'd love to do some particle physics but the current Physcis Backend is not supported, hence the migration.

bevy_hanabi has superior GPU performance but doesn't know about the physical world so it is a little booring for what I have planned, maybe I'll combine the two in the future to get the best of both worlds (physics and raw GPU power).

Montage during migration

Colliders need to be twice as large in Avian:

CleanShot 2026-02-02 at 21 11 17@2x

Not setting colliders to static leads to only the top face being collidable?
Every block basically acts like a ladder

CleanShot.2026-02-02.at.21.04.15.mp4

Bevy fps controller doesn't set Y-offset by default, leading to the player collider getting stuck on basically thin air

CleanShot.2026-02-02.at.21.29.05.mp4

Excerpt from Avian itself

How does Avian compare to Rapier and bevy_rapier?

Rapier is the biggest and most used physics engine in the Rust ecosystem, and it is currently the most mature and feature-rich option.

bevy_rapier is a great physics integration for Bevy, but it does have several problems:

  • It has to maintain a separate physics world and synchronize a ton of data with Bevy each frame
  • The source code is difficult to inspect, as the vast majority of it is glue code and wrappers for Bevy
  • It has poor docs.rs documentation, and the documentation on rapier.rs is often outdated and missing features
  • Overall, it doesn’t have a native ECS-like feel

Avian on the other hand is built for Bevy with Bevy, and it uses the ECS for both the internals and the public API. This removes the need for a separate physics world, reduces overhead, and makes the source code much more approachable and easy to inspect for Bevy users...
https://docs.rs/avian3d/latest/avian3d/index.html#how-does-avian-compare-to-rapier-and-bevy_rapier

Changes

After migrating to Avian I noticed severe

@cb341 cb341 self-assigned this Feb 2, 2026
pub use bevy::transform::components::Transform;
pub use bevy::window::*;

pub use avian3d::prelude::*;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prelude 🤤

mut timer: ResMut<terrain_resources::WorldSaveTimer>,
) {
if timer.is_ready() {
timer.reset();
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a side quest.
During the saving of a world you'd get

Saving world...
Saving world...
Saving world...
Saving world...
Saving world...

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't seem to happen before..

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe my setup changed?

@cb341 cb341 marked this pull request as ready for review February 2, 2026 21:27
@cb341 cb341 changed the title Replace rapier with avian Replace Rapier with Avian Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants