Gamepad does not detect any input from the d-pad

0 favourites
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • I came across this issue whilst trying to enable UI navigation - the D-pad button's aren't buttons - at least as far as Construct is concerned. Instead you need to use gamepad.axis to detect if they're pressed.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • On all my gamepads (5 different makes) d-pad buttons are definitely buttons.

  • I imagine pressure sensitive d pad buttons could possibly be interpreted as axis. My own experience has similarly been that d pads are buttons though.

  • I submitted a bug report to Firefox, since PS5 controller is currently using Axis 9.

    Be interesting to see if it gets fixed:

    bugzilla.mozilla.org/show_bug.cgi

  • I've been testing using a couple of generic PS1-style controllers which report their D-Pad movements as axis changes.

    Just connected a pair of Nintendo Switch Joycons and noticed their D-Pads report button presses.

    So I either need to wait to see when/if that bug's fixed, or handle all cases manually.

    I now feel I need to get my hands on a modern PS controller and an XBox controller to check how they respond too.

  • This is really frustrating me - all I want is to be able to control a menu option cursor with controller D-Pads. I have two cheap PS1 lookalikes that report axis changes when the D-Pad is pressed (this happens in Construct, the Windows Control Panel applet, and in hardwaretester.com/gamepad on both Chrome and Firefox).

    But after reading this post, I now find that it's more common for D-Pads to report button presses - but even that seems inconsistent - the only other hardware I have access to are some Nintendo Switch joycons - for Left/Up/Right/Down, they report buttons:

    14, 12, 15, 13

    But Google's found the results for a "WII Classic D-Pad" is:

    12, 11, 14, 13

    (https://www.allegro.cc/forums/thread/608275/930495#target)

    And for a PS2 controller:

    15, 12, 13, 14

    (flickr.com/photos/73073372@N00/3896185001)

    So do I really have to take at least four different configurations into account?

    I feel that I must be missing some really obvious and simple way of handling this!

  • Most people use Xbox, PS4/PS5, Switch controllers.

    Those all have perfectly mapped inputs on Chrome, so they're consistent. (Firefox isn't as good here as my bug report above shows.)

    And I'm guessing popular alternatives like 8Bitdo and Logitech would also be mapped, but I haven't got them yet.

    But yeah a lot of the other generic ones like the PS1 or N64 controllers on Amazon, do not have proper input mappings yet.

    For Angvik 2, what I did was manually create an array of button inputs for many cheap no-brand controllers. I would use the gamepad ID string to detect which controller was being used. Basically making my own personal database of controllers. This way I could have heaps of gamepads that are usuable for my game, and they'd work by default.

    Some years ago, I think I may have reported some controllers to chrome and it got mapped, but I can't remember why I stopped doing that.

    Perhaps I should try submitting an issue to Chrome again, and see if they'll add more controllers. This way we can all benefit, having controllers work properly and easily for everyone.

  • Oh now I remember now why I gave up trying to map all these devices:

    Many of these cheap controllers use the same parts inside, so they share the same Vendor and Device ID...

    Yet they have different button layouts, so how can you make it work?

    Here's one example from a couple of controllers I just checked:

    One of them has button "A" mapped to button index 2, and the other at 6!

    Making it impossible to give these controllers an official mapping. And I have more that do this kind of thing.

    It sucks but I don't know if there's much we can do. Except have custom control support for you game.

    To support these controllers DPAD, which use Axis 9 in Chrome, I could just have code that translates the axis values and make them register as button inputs for my game.

  • alastair - many thanks for confirming all this - looks like I'll have to implement something similar to what you did!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)