Add a way to detect what input modality (e.g. gamepad, KBM) is used #17666
Labels
A-Input
Player input via keyboard, mouse, gamepad, and more
C-Feature
A new feature, making something new possible
D-Modest
A "normal" level of difficulty; suitable for simple features or challenging fixes
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
What problem does this solve or what need does it fill?
Games commonly display different prompts based on the input mode the player is using.
This information is also useful for analytics (to inform development priorities).
What solution would you like?
Define an
InputModality
enum, stored in a resource.In a
PreUpdate
system (as part ofInputPlugin
) each frame, listen to touch, gamepad, KBM etc events, and set the modality based on what is being used.Maybe make this system toggleable?
What alternative(s) have you considered?
Reimplement this in every game that needs this, or reimplement this in a downstream crate.
Additional context
Previously discussed in projectharmonia/bevy_enhanced_input#22, but fundamentally this is bevy_input's problem.
The text was updated successfully, but these errors were encountered: