Input System + Event System Inconsistent Input Dead Input with Dpad like input

Not sure whether this belongs in the Input System or the UI forum…

I’ve run into a consistent issue where sometimes dpad input isn’t registered in the UI Event system when using the new input system.

I’m constantly getting frustrated when interacting with the UI in my game when navigation inputs aren’t registered when I’m using the dpad and I don’t really know where it is coming from. The navigation seems to be fine, it works as expected when using an analog stick for example.

I have just tried it in a test project and I get the same result in a basic project but I think it’s maybe made worse by frame rate? I don’t feel the issue in an empty project where I am running at a solid frame rate but as soon the frame rate is reduced slightly I get random dead input all the time when using the dpad with the UI.

Has anyone else run into this? I don’t really know what else to try other than an entirely different input system entirely.

I’m running Unity 2022.3.6f1 and Input System 1.6.3

I have the same problem. When the frame rate is too low, I need to press the dpad twice or three times to select another ui element

Since you failed to provide any meaningful information about your setup, some general stuff:

  • make sure you aren’t running the Input System in FixedUpdate mode.
  • update the Input System to the latest stable (in the time of writing it is 1.7.0)
  • make sure the proper event system is active in your project and you aren’t controlling your UI through the old event system and the old input manager (it can happen when you’re allowing the usage of both Input System and Input Manager in the settings)

I solved this problem. You need to change the Action Type from Pass Through to Value
https://discussions.unity.com/t/799195

9678029--1379708--solu.png

Thank you! That seems to be it, that looks like it solved it for my project. Not sure if that is the default or not but maybe that got changed at some point for my project. But it works way better with Value set so that’s great!

You can normalize the vector2 value by script for the UI

I did something like that personally

    public void SetNavigateY(float y)
    {
        MenuNavigate = new Vector2(MenuNavigate.x, y);
    }
    public void SetNavigateX(float x)
    {
        MenuNavigate = new Vector2(x, MenuNavigate.y);
    }

    private void NormalizeNavigate()
    {
        float deadZone = 0.2f;

        //Navigate.y
        if (MenuNavigate.y > deadZone)
        {
            SetNavigateY(1);
        }
        else if (MenuNavigate.y < -deadZone)
        {
            SetNavigateY(-1);
        }

        //Navigate.x
        if (MenuNavigate.x > deadZone)
        {
            SetNavigateX(1);
        }
        else if (MenuNavigate.x < -deadZone)
        {
            SetNavigateX(-1);
        }
    }