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 looked at other posts with similar problems but didn't find a solution for me. I have 2 gamepads that connected to construct3, all buttons work, except select button and all 4 d-pad.

    Can the problem be solved? anyone have idea why?

    I've already tried to do this with a text object -> set text to gamepad.buttonindex, but it doesn't mark anything after pressing d-pad.

    Tagged:

  • Check if these buttons work in a browser:

    onlinemictest.com/controller-tester

    greggman.github.io/html5-gamepad-test

  • No, it doesn't mark the d-pad at all. But I'm playing a gba/nds emulator on the computer where I use the d-pad, it works. What does this mean?

  • I heard Steam can cause such problems (even for non-Steam games). Try closing Steam client, or these tips:

    reddit.com/r/apexlegends/comments/19ajho4/dpad_not_functioning

  • I don't have Steam, I've never even used it. could it be a browser problem?

  • Are you on Windows?

    You could go into your control panel in windows, game controllers, and it let's you do a little test to see buttons light up.

    I think I remember some controllers think the "D pad" is almost like an analogue stick or a trigger with sensitivity, even though you'd expect it to behave like a regular button.

  • Are you on Windows?

    You could go into your control panel in windows, game controllers, and it let's you do a little test to see buttons light up.

    I think I remember some controllers think the "D pad" is almost like an analogue stick or a trigger with sensitivity, even though you'd expect it to behave like a regular button.

    Good idea, hadn't thought to look on devices. But I have to insert some screenshots, I don't understand well. I'm Italian and the screenshot is in my language.

    The box with "Asse X" written underneath represents the left analog stick. The 2 colored bars with the words "Asse Z, rotazione Z" represent the right analog stick. (sounds weird to me, but I get it). As for the buttons, they all work except the select, and the dots all can light up except 11 and 12.

    The strange thing (for me) is where it says "Punto di vista", here: that represents the d-pad, and it works. (Arrows appear.)

    What should I do? it says that perhaps calibration is necessary, but it only concerns the analog sticks.

  • Oh that's exactly what I wondered it might be!

    I'm not sure on solution but there's a chance it's being seen as an axis. You can test on your project by adding text object and set text to: gamepad.rawaxiscount(0) and this will tell you how many axis it detects. Normally you'd assume it would display this as 4, (left right up down, for left analogue stick and right analogue stick), maybe you will get 6 as result.

  • Not 4, not even 6, 10!

    But how strange, I had already done this test, and it seemed to me that it was 12? well... I definitely imagined it... or I got confused.

    okay, the number is 10. However, the gamepads I bought were 2 with a USB stick (they cost very little). Maybe it doesn't matter, since I also know that (0) indicates gamepad index number 0, so the second has nothing to do with it.

    ah, there's another strange thing (just for change XD): the expression Gamepad.RawAxis returns with (0,0) and (0,1) the vertical and horizontal value of the left stick. While (0,2) returns the horizontal value of the right stick.

    At this point, it occurs to me: (0,3) will return the value of the vertical axis of the right stick, but instead it returns nothing... >.<

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow whaat!?

    Hopefully that's the answer, one of those axis might be the dpad. Again this is all just guesswork!

    I forget the expression wording but below is a possible test to try (but may need to write the correct gamepad.Blah parts):

    Have text object, every tick, set text to "" (so it's blank)

    Next event block:

    Do a For loop: For 0 to gamepad.axiscount

    Action: Append to text:

    loopindex & " = " & gamepad.axis(loopindex).

    This should give you a text object with a list of all 10 axis's values, so you can then see what all 10 do when you press buttons on your controller. If lucky, the dpad will make one of these react and you might find it's axis ID is 8 or something.

    Curious to know the results!

  • ohh XD I got something. Of course it's the strangest thing that's ever happened to me while programming.

    well, I get results ONLY with (gamepad.rawaxis(0,9) listen:

    with dpad right I get: - 0.428...

    dpad left: 0.714...

    dpad down: 0.142...

    not pressing any d-pad button, the text reads 3.285

    Ok, maybe if you are very knowledgeable in mathematics you understand the meaning of these numbers, I don't. Now guess what I get by pressing dpad up?

  • Uhhh... Nope no clue at all!

    The one pattern I see is that Left is a positive number, right is negative. Down is positive, sooo up should be negative?

    Not sure I can think of solution or workaround other than... Literally using those numbers in your events, but not sure if these values are universal for all gamepads that behave like this, or if different gamepads use different values.

    Don't you just love technology?

  • You are right! In fact dpad up is negative, but the strange thing is that the value is -1!

    I've already thought about it, I don't know if I can write events that work for all gamepads, but for now I just want to test the difficulty of the game with my gamepad, I'll think about that later...

    Who knows how to find the mode button is (it wasn't select that was missing, but mode, which is not detected in any way in the panel), but it must be something even more complicated, I don't want to think about it... XD

    Yes, if used with good sense, technology is fantastic!

  • The first thing we need to know when discussing a gamepad is

    • What browser engine is being used? (Chrome)
    • What gamepad device are you using? (Is it a popular controller?)

    I have many controllers, for example cheap USB N64 controllers, and they have this same exact issue.

    It seems to be a very common problem for some controllers to have the DPAD acting as an axis with strange values.

    Solution 1

    Submit a bug report to the Chrome devs.

    Tell them the gamepad device ID string, and the exact inputs for each button and axis. Perhaps then suggest then which button should be what, like button 16 should be "A".

    This will allow them gamepad to be recognized and mapped properly for everyone officially.

    Solution 2

    Manually identify which controller the player is using. And make adjustments based on the gamepad ID string.

    This is good practice anyway, since you'll want to detect at a minimum wether the player is using Sony, Xbox, or Nintendo brand controller so that you can show the appropriate button prompts. While it use to just be Xbox style controllers that were common on PC, other brands have increasingly become popular in recent years.

    After detecting the type of controller which is connected, you can then make sure that these controllers use different gamepad inputs.

    For instance, when the axis = 0.714, then count that as the left Dpad as being held down.

  • PS5 controller with Left Dpad

    Here is an example with the popular PS5 controller.

    I am holding down the Left DPAD button:

    Firefox

    It shows the dpad on Axis 9, which is fairly common:

    Chrome

    The gamepad has been properly mapped, so that it's detected as the standard button 14. Which is the same as they map it with the Xbox controller. This demonstrates why it's important for people to tell the browser devs what buttons their gamepad uses. So that we can have consistency across all gamepads.

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