So I generally like the way that the new enhanced input system is designed but there are a couple aspects of it that I am finding frustrating.
- Different Input Actions assigned to the same key but in different Input Mapping Contexts will fire on switching Contexts. For example, I have an Input Action for Dodge and one for Exit Menu both mapped to the B button. When exiting a UI menu using the B button, I switch the Input Context but the character now dodges because the B button had been pressed previously. The only way to reliably deal with this situation is to implement the same Input Action for both events even though the player could conceivably like to remap them to different keys.
To me, switching Input Mapping Contexts should clear any previous inputs to prevent this from happening. If that’s not possible, it would be nice to be able to clear input on specific Input Actions or keys until a new input occurs.
Edit: So the AddMappingContext function is supposed to flush input but that does not seem to be occurring for me even on blank projects.
You can demonstrate this pretty easily by creating the FirstPersonWeapon default project and just changing IMC_Weapon IA_Shoot from LeftMouseButton to SpaceBar. (which is the jump button in the default context) Then if you hold down SpaceBar and walk over the weapon pickup, your character will shoot immediately without having to repress the button.
- Chorded Actions. If I want to press two buttons to do an action, I need to set up one as a normal Input Action and link it to another Input Action using the Chorded Action trigger. This means that actions that require two buttons will always require two buttons regardless of how the player remaps their controls. For example, maybe a heavy attack is done by pressing Forward + X. If the player wanted it to work with only X, this would not be possible using the current system. Similarly, if players wanted to implement dual input for a currently single input action, this is also not possible. The system should work that you can define any button combinations to trigger the action rather then one key = one input action.
If any of the above is already possible and I’m just dumb, please let me know.