I have a game that I’ve packaged for HTML5, it’s working OK, but I can’t control it with an Xbox controller. It works in PIE obviously.
Does anyone know what I have to do to get a gamepad working in a HTML5 game?
I have a game that I’ve packaged for HTML5, it’s working OK, but I can’t control it with an Xbox controller. It works in PIE obviously.
Does anyone know what I have to do to get a gamepad working in a HTML5 game?
Gamepad APIs are exposed by emscripten but not yet have been implemented for engine. I will add this request as a official TTP. Meanwhile you can have look at html5.h in emscripten sdk. html5.h — Emscripten 3.1.39-git (dev) documentation .
Ah, thanks for the answer Ankitkk. Hopefully it is implemented at some point.
I have 4.7 release and I can’t get GamePad working. Is it suppose to work?
Thing is with html5 it is limited to what browser can do and Html5 gamepad support seems to be experimental
Gamepad code is there and should be working - what issues are you facing?
I know this is an old thread and it’s been deemed answered, but I have been working in 4.9, and via Launch I haven’t been able to get my game to pop up in Chrome or 64-bit Firefox, but in 32-bit Firefox I was able to get it up without a gamepad plugged in. When my gamepad is plugged in I receive an error in the image below.
After I select OK, I receive the text:
FSlateApplication::OnControllerButtonReleased?5()
undefined?T()
FHTML5InputInterface::SendControllerEvents()
FHTML5Application::PollGameDeviceState(float)
FSlateApplication::PollGameDeviceState()
FEngineLoop::Tick()
HTML5_Tick()
dynCall_v
I’m about to test this in 4.10, but I thought I’d add this for some info since the OP did not and it’s been a while and I’m getting an error.
Edit: It does appear to have the exact same problem in 4.10 with the error in the same file on a different line.