gamepad raw button detection

From the Asset Store
Detects any kind of ad blocker. Very easy implementation into already existing projects
  • I have an xbox one controller that most likely has been dropped and damaged. when I go to this site

    gamepad-tester.com

    the right trigger won't go above 0.40 whereas the left trigger goes all the way to 1.00 - they are touch sensitive (which I had no idea).

    Construct won't detect button presses for this trigger button because I assume the value is not 1.00

    Is there a way to get raw button info? OnAnyButtonPressed won't trigger and Gamepad.LastButton(0) is blank when I tap the Right trigger button.

  • construct.net/en/make-games/manuals/construct-3/plugin-reference/gamepad

    RawButton(Gamepad, Index)

    Retrieve raw button input for a specific gamepad and button index. This returns the value without keymapping. Button values range from 0 to 1 (pressure sensitive buttons can return values in between).

  • yeah I saw the manual, but I didn't understand how I was to use those functions.

    like this?

    would this be the same as a Button Press Trigger Event?

    If so, are devs replacing all Triggers with this to account for wonky controllers? I mean, if I happen to have a controller with a damaged button, seems like any players I am targeting might have the same issue.

    Follow up: if I do replace all my triggers with these System events should I allow any value above 0 to be a button press? I know analog controllers have drift. Could a damaged trigger button give off 'noise' in the low value ranges? so Gamepad.RawButton(0,7) > 0.20 ??

  • Construct uses 0.5 as the pressed threshold. So testing button > 0.5 with 'Trigger once' is equivalent to what Construct does for detecting a button press.

    I don't think 0 is a sensible threshold as noise in the reading may produce small nonzero values. I thought 0.5 made sense as being the half-way point. You can try and hack damaged controllers to work, but if it's so damaged the button doesn't read anything at all, you can't fix that in software... so there's a limit to what you can do about this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would think it is unreasonable to design a game assuming end users will have a damaged input device. It would make more sense for the device to be replaced instead, since it would not always function as intended in any game they use it with, as opposed to one that was working as intended.

  • I only mentioned to give some allowance since the xbox controller's RT button works fine on the xbox itself. If it didn't work on the xbox, I wouldn't expect it to work in my game. But seeing how it worked on console I assumed the controller was fine and my game had the bug. luckily I also have a 360 controller which worked 100% and helped me troubleshoot the actual problem.

    maybe I'll make a 'tunable' threshold value and start at 0.20, if I start to get issues in testing I can always raise it.

    thanks Ashley oosyrag

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