You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Bevy 0.9, I am watching for Mouse5 or Mouse4 to be pressed using MouseButton::Other(32) and MouseButton::Other(64).
However, it only recognizes the input on the first press, and then proceeds to no longer recognize the input. Left click works fine.
The code I used in Bevy 0.9 to watch for mouse input follows:
fn watch_for_mouse_input(mouse: Res<Input<MouseButton>>) {
if mouse.just_pressed(MouseButton::Other(64)) { println!("Detected input 'Mouse5'!"); }
if mouse.just_pressed(MouseButton::Other(32)) { println!("Detected input 'Mouse4'!"); }
if mouse.just_pressed(MouseButton::Left) { println!("Detected input 'Left Click'!"); }
}
And the output in console (comparing when the input is recognized vs the MouseEventInput stream from Bevy) is attached in this screenshot:
Notice how after Mouse4 and Mouse5 being recognized once, subsequent presses are no longer recognized.
It seems that, when releasing mouse4 or mouse5, it is being recognized as MouseButton:Other(0) rather than 32 or 64, and so MouseButton::Other(32) and 64 are not being recognized as being released.
If I hold mouse4 (32), then hold mouse5 (64) at the same time, it says that MouseButton::Other(96) has been pressed. If I release mouse4, it says MouseButton::Other(64) has been released, and then the next time I press Mouse5, it is recognized one time.
My apologizes if this is not actually a winit issue; I'm not sure if this should be reported here or in the Bevy github somewhere.
I'm running Windows 10.
The text was updated successfully, but these errors were encountered:
In Bevy 0.9, I am watching for Mouse5 or Mouse4 to be pressed using MouseButton::Other(32) and MouseButton::Other(64).
However, it only recognizes the input on the first press, and then proceeds to no longer recognize the input. Left click works fine.
The code I used in Bevy 0.9 to watch for mouse input follows:
And the output in console (comparing when the input is recognized vs the MouseEventInput stream from Bevy) is attached in this screenshot:
Notice how after Mouse4 and Mouse5 being recognized once, subsequent presses are no longer recognized.
It seems that, when releasing mouse4 or mouse5, it is being recognized as MouseButton:Other(0) rather than 32 or 64, and so MouseButton::Other(32) and 64 are not being recognized as being released.
If I hold mouse4 (32), then hold mouse5 (64) at the same time, it says that MouseButton::Other(96) has been pressed. If I release mouse4, it says MouseButton::Other(64) has been released, and then the next time I press Mouse5, it is recognized one time.
My apologizes if this is not actually a winit issue; I'm not sure if this should be reported here or in the Bevy github somewhere.
I'm running Windows 10.
The text was updated successfully, but these errors were encountered: