I've got my Input Map in Project Settings set to its defaults, which appears to have both the keyboard arrows and gamepad D-pad mapped to the same Up/Down/Left/Right events.

The keyboard works fine processing in the _process() method with code along the lines of 'if Input.is_action_pressed("ui_up").

But the gamepad does nothing.

So, what am I doing wrong?

Does your gamepad work in the Joypads demo? It should be recognized there automatically.

I don't have a link as of this post, but there is a good amount of info in the docs on _input(event) which deals with all input. Might be worth a look. Good luck!

Thanks guys, but still no luck.

I had previously tried the Joypads demo and it indicates that the gamepad is being read just fine. I've also scoured the Godot docs and API reference, as well as various online materials - all to no avail.

Keep in mind, I'm getting gamepad axis and button deltas in GDSCript just fine. And my code in the _process() method such as 'if Input.is_action_pressed("ui_up")' is return the appropriate values when I hit the keyboard arrow keys. What I'm not seeing though is 'if Input.is_action_pressed("ui_up") returning the expected values when I manipulate the gamepad.

Any ideas?

Thanks for you help!

@marty said: Thanks guys, but still no luck.

I had previously tried the Joypads demo and it indicates that the gamepad is being read just fine. I've also scoured the Godot docs and API reference, as well as various online materials - all to no avail.

Keep in mind, I'm getting gamepad axis and button deltas in GDSCript just fine. And my code in the _process() method such as 'if Input.is_action_pressed("ui_up")' is return the appropriate values when I hit the keyboard arrow keys. What I'm not seeing though is 'if Input.is_action_pressed("ui_up") returning the expected values when I manipulate the gamepad.

Any ideas?

Thanks for you help!

Input.is_action_pressed("ui_up")returns true or false, it does not return axis value.

Let's say input mapping have joystick 0 with Left axis and Right axis setup, to read the joystick axis values you need that code Input.get_joy_axis(0,0) It works , you'll get values from 0 to 1 with joystick moving.

Your suggestion is very helpful information!

Actually though, in my mapping, I am using the defaults, which appear to be intended return values for the d-pad. But when I hit the d-pad, I get no deltas of any kind. If I hit an arrow keys on the keyboard though, I do get them.

What I really want to read is the d-pad.

Any idea what I'm doing wrong?

@marty said: Your suggestion is very helpful information!

Actually though, in my mapping, I am using the defaults, which appear to be intended return values for the d-pad. But when I hit the d-pad, I get no deltas of any kind. If I hit an arrow keys on the keyboard though, I do get them.

What I really want to read is the d-pad.

Any idea what I'm doing wrong?

I am not sure it's in the defaults or defaults is really using joystick.

Why can't you add your Dpad directions in Input Mapping to get it working ? And don' t worry, when you deploy your game it embed the Input mapping settings.

Heya, ML.

The Input Mappings settings by default have both arrow keys and d-pad vectors set as the input sources for 'Input.is_action_pressed("ui_up")'. And that's how mine are set. Yet, when I run code using 'Input.is_action_pressed("ui_up")' and the like, only the arrow keys delta that code.

Each gamepad has its own controls, unfortunately, so it might be that the d-pad's actually a different set of buttons from what it is for other gamepads (i.e. maybe the d-pad isn't registered as a hat, but as buttons, when Godot is expecting a hat). What kind of gamepad is it? Could you try other buttons?

It's a SteelSeries Nimbus. When I run the Joypad Demo, the d-pad seems to be working fine.