bevy_rapier icon indicating copy to clipboard operation
bevy_rapier copied to clipboard

Velocity struct does not implement Bevy's Component trait

Open rubenVillalvazo opened this issue 1 year ago • 4 comments

Hello,

I recently updated to the latest version of Bevy (0.12.0) and encountered an issue with the Velocity struct from bevy_rapier2d. The Velocity struct does not implement Bevy's Component trait, which is now required for all components in Bevy's ECS (Entity Component System).

Here's the error message I'm getting:

error[E0277]: the trait bound `bevy_rapier2d::dynamics::Velocity: bevy::prelude::Component` is not satisfied
   --> src/game/asteroids_system.rs:137:16
    |
137 |     asteroids: Query<(&Asteroid, &Transform, &Velocity)>,
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `bevy::prelude::Component` is not implemented for `bevy_rapier2d::dynamics::Velocity`

(By the way your work is great. Thank you for your time and for your contributions to this project.)

rubenVillalvazo avatar Nov 07 '23 23:11 rubenVillalvazo

This is because bevy_rapier has not (yet) been updated for Bevy 0.12, and Rust treats traits from different versions of a crate as different (for reasons outside the scope of this, and that honestly I don't fully know/understand myself). #439 seems to be ready to merge, so we're just waiting on that to happen and then a new version of bevy_rapier to be released.

(I have no affiliation with this project, I'm just some random guy who happens to also be using it and it also awaiting it to support Bevy 0.12 so I can upgrade.)

Kromey avatar Nov 07 '23 23:11 Kromey

Thank you @Kromey I will keep an eye on the update release

rubenVillalvazo avatar Nov 08 '23 00:11 rubenVillalvazo

@rubenVillalvazo @Kromey 0.12 support is released now :)

Aceeri avatar Nov 08 '23 21:11 Aceeri

Thank you @Aceeri I'm going to update it right now

rubenVillalvazo avatar Nov 10 '23 14:11 rubenVillalvazo