Using Controller Stick and DPad to Navigate UI elements

Hi all,

I’m using the new input system along with the InputSystemUIInputModule component to allow a controller to navigate UI elements. This specific component allows me to slot in a specific InputActionAsset as well as an Action for the the Move slot. Unfortunately, there is only one action to map to Move, thus preventing me from using my stick action AND my DPad action (I have either working, but not at the same time). I’ve also tried created a second binding within a single action, but this doesn’t work either. Has anyone been able to use the new input system while navigating UI with both the DPad and stick at the same time?

Edit : SOLVED
Somehow I got my stick action set up such that I couldn’t add a second binding to the Dpad. I generated a new actdion, created the DPad binding first and was then able to add the stick binding after and it works. Seems like this is a potential bug.

Got into the sample problem, the only “solution” to me was to change the “UI/Navigate” action type to “Value” instead of “Pass Through”; Sadly that breaks my PlayerInput;

Edit: It also messes the keyboard Arrow keys input

My solution fork inputsystem and add the following lines in the method “ProcessNavigation”

var gamepad = Gamepad.current;
if (gamepad != null)
{
    var value = gamepad.leftStick.ReadValue();
    var m0 = Mathf.Max(value.magnitude, 1e-9f);
    var m1 = Mathf.InverseLerp(0.3f, 0.925f, m0);
    if (0 <= m1)
    {
        moveVector += value * (Mathf.Clamp01(m1) / m0);
    }
}

// Unity code after is 
if (!usedSelectionChange && (!Mathf.Approximately(moveVector.x, 0f) || !Mathf.Approximately(moveVector.y, 0f)))