Gamepad Right Y axis not working in Chrome, NW.js

1 favourites
  • 12 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Problem Description

    In Chrome gamepad.axis(0, 3) expression always returns 0.

    "Gamepad Compare axis" event for Right analog Y axis always returns 0.

    Attach a Capx ... .capx?dl=0

    Description of Capx

    caxp displays values for all 4 axes. Also displays words Left, Right, Up, Down when right stick is moved.

    Steps to Reproduce Bug

    Move left and right sticks.

    Observed Result

    In Firefox all axes are working, all 4 values and all 4 words (Left, Right, Up, Down) are displayed.

    In Chrome the value for right Y axis is always 0. Words Up and Down never appear.

    Expected Result

    gamepad.axis(0, 3) to return correct value

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (NO)
    • Internet Explorer: n/a
    • NW.js: (YES)

    Operating System and Service Pack

    Tested on two PCs: Windows 8.1, Windows 10

    Tested with two gamepads: Logitech Rumblepad 2, Philips gamepad

    Construct 2 Version ID


  • Ashley

    I have thoroughly tested this and can confirm this bug is still in Chrome and NW.js.

    However, curiously, it works perfectly well in Firefox.

    I have a big project waiting on this fix, let's see if we can knock this one down.

  • It works fine for me with a wired Xbox 360 controller. I think it might be an issue with the OS/browser/driver combo...

  • Try a few different numbers for the y axis ... eg dual shock has a 5 for the right y axis if I remember.

  • Ashley

    Like I mentioned in my bug report, I ran tests on two different laptops (Windows 8.1 and Windows 10) and with two different gamepads - Logitech and Phillips.

    On both machines and for both gamepads the Right analog Y axis didn't work in Chrome.

    Maybe the Xbox 360 does work, but all other gamepads don't?


    I just tried axis numbers from 4 to 10 - no luck.

  • i was reading on steam forums they have same issues because rumble pad 2 is pretty old and uses outmoded direct input api rather than modern standard x input api. i assume that xinput is default expectation for construct joypad plug in. for gamers to use these older pads they have to use bridging software called x360ce ... put-games/

    edit i was also reading that htm5 accepts both dinput and xinput so you should get readings using raw data. however you would have to manage compatibility.

    its funny though that firefox can figure it out and not chrome.

    looks like joypads are a bit of a minefield

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • NetOne, thanks for the explanation!

    I'm familiar with the x360ce software, but it doesn't work with html5 games.

    I found another generic Bluetooth gamepad, it's not that old (about 4 years), but it too has the same issue with the right stick.

    So now I have three different gamepads with the same problem...

    I tried RawAxis expression and it does read Right Stick Y position. Axis number is 5.

    So I'm still confused - whose fault is it that filtered input from the right stick doesn't work in Chrome?

    Is it because Scirra didn't implement dinput method, or because Chrome doesn't support it?

    STARTECHSTUDIOS, what gamepad model do you have?

  • So i looked into it a bit more

    it looks like browsers have to use the web standard Gamepad API.

    Gamepad api default mapping is standard xinput mapping.

    However the Gamepad API has the funcionality to recognise different controller types from different manufacurers throuh a controller ID and automatically remap them to a "Standard" (xinput slyle) mapping. But the browser developers have to make the effort to include this with a list of controller IDs.

    It seems firefox keeps a list of popular direct input joypad ids and automatically remaps them to standard. Where as chrome possibly dosent and just goes with standard or it dosent recognise your joypad id. ... amepad_API

  • dop2000

    So, I have both an xbox 360 controller and another controller I quite like developed by a company named sabrent. It has dual stick and turbo button functions as well as 6 buttons and 2 shoulder buttons on each side. It's a really nice one. I like the 6 buttons for games like Street Fighter 2

  • same problem here. Gamepad.Axis(0, 2) works.

    Gamepad.Axis(0, 5) does not =(

  • rgarcez

    Did you mean Axis(0,3)?

    Axis(0,3) is the filtered input from right Y axis. RawAxis(0,5) is the unfiltered input from the same axis.


    Try this capx:

  • dop2000 Thanks! works like a charm =D

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