Open lanesawyer opened 7 months ago
I'm not sure if this is right, but I got it to work by removing the LayerComponent
.
fn cleanup_background(mut commands: Commands, layer_query: Query<Entity, With<LayerComponent>>) {
for entity in &layer_query {
commands.entity(entity).despawn_recursive();
}
}
Sweet, I'll give that a go. Thank you!
Hey there, been playing with
bevy-parallax
today and ran into a problem: I can't manage to remove the parallax!This may be me being awful at Bevy and not a problem with the library itself, so if that's the case I apologize in advance.
My setup has different game states (
Menu
,Game
), and I only want the parallax drawn when I'm inGame
state. I only have one camera for the various states, so I can't simply throw away the camera entirely like some of the examples in this repository do to reset the parallax.Here's how I'm initializing it:
I tried to remove the
ParallaxCameraComponent
from the camera when leaving theGame
game state, but that isn't working:Is this a valid use case for
bevy-parallax
adding some sort of remove/despawn command added in future versions, or am I just doing it wrong?