-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Visibility in Draw components doesn't work properly, I suppose #187
Comments
(I assigned the |
Yeah this certainly sounds like a bug. Individual entity visibility shouldn't determine whether or not we clear the framebuffer. A minimal example that reproduces the error would be helpful here. |
@cart What I did is adding this system to fn speed_circle_place_system(
mut input_reader: ResMut<EventReader<MouseButtonInput>>,
button_input: Res<Events<MouseButtonInput>>,
mut query: Query<(&Ball, &mut Draw)>,
) {
match input_reader.latest(&button_input) {
Some(MouseButtonInput {
button: MouseButton::Left,
state: ElementState::Pressed,
}) => {
for (_, mut draw) in &mut query.iter() {
draw.is_visible = !draw.is_visible;
}
}
_ => {}
}
} If you click left mouse button, the ball would disappear. But also the paddle would stop moving even if you move it by pressing left/right arrow key. I checked this bug on Windows 10 + rust 1.45.2 and I'm not sure that it is reproducible on other OSs. |
Resolved by #230 |
First of all, thanks for the great game engine!
I have used it to make my prototype game. In the game, I wanted to hide some object(entity) in a particular condition, so I changed the
is_visible
value in the Draw component of the entity.But when I set the
is_visible
value tofalse
, the frame buffer suddenly wasn't refreshed at all. The window kept showing me the last frame just before I set the value to false. And I set the value to true again, then whole world goes normally.Is this intended or just a bug? If it is a bug, would you fix it or let me know where to start fixing?
The text was updated successfully, but these errors were encountered: