Want to acces 2 components for my community demo game: cannot borrow world
as mutable because it is also borrowed as immutable
#13769
-
I'm new to rust and bevy, so it could be that I'm missing something. Public repo: https://github.com/Retrodad0001/evil_dungeon I want to create a simple but polished game for the community to learn rust, bevy, and the "ECS way" of designing a game and share that knowledge with everyone. error[E0502]: cannot borrow
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Is |
Beta Was this translation helpful? Give feedback.
Is
collision_event_handle_damage_dealing_and_health_for_all
a system? If so, I’d recommend using aQuery
instead ofWorld
so that you can use something likeQuery::get_many_mut
to fetch both entities without breaking Rust's mutability rules.