-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
make Userinput for gamepad and touch more intuitive #5163
Description
What problem does this solve or what need does it fill?
I have been making a tutorial series for bevy and currently working on user input.
1:I find it very confusing and unintuitive the way gamepad is split into buttons and axis with there being no clear cut-off between what is a button and what is an axis.
2:The touch input system is also confusing and unintuitive, but for different reasons. primarily that all the functions have different names than their corresponding Input equivalent. such as iter() and get(). and secondary the coordinate system is different to the curser coordinate system, curser has lower left being 0,0 but touch has top left being 0,0
What solution would you like?
- can we make all the buttons and axis into one enum an then simplify the interface so that it has just one Input that returns pressed and released like a key press based on the setting and thresholds. and one Axis That represents the raw position of the buttons.
I feel having both input and axis for the buttons for only a single trigger is confusing and messy.
- I don't know if it's too late to make a breaking change like this but could we rename the function to follow the convention of the rest of the input structs. and for the coordinate system that seems like that could easily be changed but could introduce bugs for anyone already using it.
What alternative(s) have you considered?
- could simply move the trigger2 to the axis enum instead of the button enum, this would remove the need for Axis
Additional context
at the end of my video I talk about it if this makes no sense.
https://youtu.be/PjLozjlOgJ4