-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add Input::reset_all #3383
Copy link
Copy link
Closed
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with Bevy
Description
What problem does this solve or what need does it fill?
Sometimes, all of the inputs of a given type need to be reset at once.
What solution would you like?
Add a Input::reset_all method.
What alternative(s) have you considered?
Manually set the Input<T> resource to its default value.
E.g.
*keyboard_input = Input::<KeyCode>::default();Additional context
Used in a workaround for #1700, as documented in https://bevy-cheatbook.github.io/programming/states.html#with-input
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with Bevy