- Home /
WebGL Recognizing Gamepad Triggers
I'm building a WebGL game in 2020.3 that uses a Gamepad. I'm testing on Firefox, Chrome, and Edge (all up to date).
The "new" input system doesn't work at all, so that's out.
The "old" input system works in Chromium browsers (Chrome and Edge), but not Firefox, so that's a start at least.
The problem I'm running into is that the "old" input system only KIND OF works. The thumbsticks act as expected, but the buttons seem like they are on "autofire" (example: GetButtonDown("Fire1")) acts like a machine gun, not a bolt-action rifle as it does in the editor). The Triggers (GetAxis("CustomTriggerAxis")) don't work at all, though they work perfectly in the editor.
Has anybody successfully done WebGL with a Gamepad in Unity? If so, what's the trick?
TL;DR Gamepad works in editor via "old" input system, only half works in WebGL. "New" system doesn't work in WebGL at all. What do?