Controller stick causing too many actions to occur when pushing in a given direction.

Im a newer developer trying to design a fighting game style input, wherein each direction is mapped to a number, then on a button press the attack checks to see what the last three numbers in the list were, for example, a stick starting down and rolling forward is a quarter circle forward or a 236.
This all works perfectly on keyboard because each direction can only be called once because WASD are buttons, but upon switching to controller i run into the issue that ever tiny micro angle of the controllers left stick, starts a new input action, resulting in the action of pressing down, filling my list with 2’s where it should only input one until the stick returns to neutral and then pushes down again.
ideally i dont want to seperate out code for inputs based one one method or the other as everything is based around input actions

You can treat the stick like a dpad by binding to the up/down/left/right “synthetic” buttons on the stick using a Vector2 composite and setting it to “digital” mode.

This is not what im having trouble with, more that each individiual micro angle of the controllers stick causes a new input action / thinks its pressing a whole new button.

Did you ever figure out a good solution? Having the same issue.

In addition to the above suggestion, I was able to solve my problem by adding a “Press Only” trigger behavior on the vector 2 composite.
9027280--1245631--upload_2023-5-21_10-28-25.png

2 Likes

Thanks ! It’s work. Very usefull !