Fast D-pad change results in no change

Is anyone else having a problem like this? I want to ask before I try to submit a bug report that gets rejected because it can’t be reproduced.

When I use my d-pad on my controller, if I quickly change to the opposite direction then there is no call to OnMove, even though I’m now pressing the d-pad in the opposite direction.
I have successfully done with with both vertical and horizontal axis, but it is a lot easier for me to do it horizontally.
I’m not doing this at inhuman speeds; I’ve never been that good with reflexes.

What controller and what platform? What’s the bindings on the move action?

Windows, Rock Candy Xbox 360 controller.
The bindings are a d-pad, left control stick, WASD, and arrow keys. Set to a Vector 2.

I’m having the same issue. Any controller I use (Xbox, Switch, PS), the D-Pad messes up. If I am pressing left and right quickly, it’ll miss an input and I can be holding a direction but the code either registers it as 0 or the opposite direction. I have checked the input debugger and it is recognizing it correctly - so I’m assuming it’s something wrong with the OnMoveInput below.

public void OnMoveInput(InputAction.CallbackContext context)
    {
        MovementInput = context.ReadValue<Vector2>();
       
        if (MovementInput.x >= 0.19f)
        {
            NormInputX = 1;
        }
        else if (MovementInput.x <= -0.19f)
        {
            NormInputX = -1;
        }
        else
        {
            NormInputX = 0;
        }

I tested removing the .19 deadzones from the code above and was still reproducing the issue.

I’m wondering if OnMoveInput() is just being missed for some reason. Is there perhaps a better way to register held input? I’m assuming that InputAction.CallbackContext is only being run when the input system is registering that “something happened once”. If thats the case, it’s missing changes in the D-Pad for some reason.

I MIGHT have solved it (have not been able to re-produce so far) but what I did was set up the D-Pad the same way that the keyboard is set up.

Add a 2D Vector Composite to the “Move” Action and set up the Up, Down, Left, and Right inputs with the individual D-Pad buttons.

7775607--980703--upload_2022-1-2_12-31-26.png

2 Likes

I literally took apart my controller, convinced that it was my issue. Thank you for this. Works perfectly.