In order to discern player intent, my game records axes from UnityEngine.Input into a list, then checks the inputs of the next few updates to see if the player entered more commands. For example, if they imperfectly press two buttons together, or if they input a direction right after a button. This also extends to fighting game-style special move inputs.
Is there anything like an input history built into the new input system? Or some kind of grace period adjustment for modifiers? Or should I just create a public function for each conceptual button (instead of actions) and apply modifiers myself?
As far as stuff goes that currently comes built in, there’s InputEventTrace to record input at the event level and InputActionTrace to record input at the action level.
Thanks! I poked around, and I think I can make that work.
Is there any combination of Interactions that I can use to create a double-tap to dash input? I.e., 1) a player doubletaps right (either the D key, the arrow key, or the dpad on a gamepad), 2) their character begins a dash animation 3) their character continues running right while the key is held, and 4) their character stops running when the key is released.
I can make this happen using the action trace and C#, but I feel like I might be duplicating your work that way.
Not out-of-the-box ATM. There’s MultiTapInteraction but ATM that’s a trigger-once kinda deal. I.e. it will perform when reaching the tap count and then go back to waiting. I’m thinking that interaction would probably be more useful if it actually stayed performed after the tap count has been reached until the button is released next.
Thanks for letting me know! I can try my hand at a custom interaction.
There are certainly cases where double-tap-immediate-release makes sense, like double-clicking in mouse or touch oriented games. But having another interaction for double-tap-and-hold certainly makes sense for gamepad oriented action games.