Replies: 1 comment
-
Your code above is putting the To fetch multiple values in your query, you can bundle them up in a Tuple in that first type parameter: mut query: Query<(&mut Bird, &mut Sprite)> and then destructure the tuple by adding some extra parens in your for loop as well: for ((mut bird, mut texture_atlas)) in query.iter_mut() { |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
bevy version: 0.16.0
OS: Arch Linux x86_64
CPU: AMD Ryzen 7 8845H w/ Radeon 780M Graphics (16) @ 5.137GHz
GPU: NVIDIA GeForce RTX 4060 Max-Q / Mobile
I am attempting to recreate flappy in bevy by following a tutorial, while attempting to animate the bird by querying its texture atlas, I was given an error saying: rustc:
&mut bevy::prelude::TextureAtlas
is not a validQuery
, I then attempted to replace texture atlas with sprite in the query but is given a similar error: rustc:&mut bevy::prelude::Sprite
is not a validQuery
. Is there any solition?Also, here is my code:
The error:
Beta Was this translation helpful? Give feedback.
All reactions