dimforge / bevy_rapier

Official Rapier plugin for the Bevy game engine.

Home Page:https://rapier.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Velocity struct does not implement Bevy's Component trait

rubenVillalvazo opened this issue · 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.)

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.)

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

@rubenVillalvazo @Kromey 0.12 support is released now :)

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