Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Velocity struct does not implement Bevy's Component trait #443

Closed
rubenVillalvazo opened this issue Nov 7, 2023 · 5 comments
Closed

Velocity struct does not implement Bevy's Component trait #443

rubenVillalvazo opened this issue Nov 7, 2023 · 5 comments

Comments

@rubenVillalvazo
Copy link

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

@Kromey
Copy link

Kromey commented Nov 7, 2023

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

@rubenVillalvazo
Copy link
Author

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

@Aceeri
Copy link
Contributor

Aceeri commented Nov 8, 2023

@rubenVillalvazo @Kromey 0.12 support is released now :)

@rubenVillalvazo
Copy link
Author

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

@Vrixyz
Copy link
Contributor

Vrixyz commented May 23, 2024

I believe that's fixed now! Closing.

@Vrixyz Vrixyz closed this as completed May 23, 2024
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

No branches or pull requests

4 participants