Web build controller input works, except for tutorials.

4.3

Hi Team, I have a web build of a game uploaded on itch.io. It works fine, controls are as responsive in the browser as they are in editor; no problem there.

However, my tutorials use get_joy_name() to determine how to display what keys/inputs a player should use for certain actions, like “SPACE” or “A” to jump if the player is using a keyboard vs. XInput device, respectively.

This works in the editor and in a Windows build, but this specific part does not work in a web build. I’m not using a Steam downloaded version of Godot, so I don’t think that has anything to do with it. Any ideas would be helpful (I’ve been trying to figure this out for a little over a week with zero progress).

Please let me know if there’s any additional info I can provide; I haven’t been able to find anything on this particular problem after looking around for a week or so.

Just tested it and got similar results. I assume browser hides all devices from interacting directly and provides “general” input info, so there most likely no way to detect joypad in browser. Easy solution is to let player choose which type of input to display in web version.

1 Like

Hey, thanks for trying it out! It’s unfortunate those were the results, but your experience was kind of what I was guessing would happen; and your solution was also what I was expecting I would have to do, but couldn’t be sure it wasn’t just something I messed up.

Thanks again for trying it out for yourself - I’ll suggest this gets added to docs somewhere since I couldnt find definitive information about it anywhere.

It’s more likely web API thing, than Godot thing, since some browser may provide that info and some don’t. That being said, Web version of Godot missing lots of features compared to “retail” version, and some of them undocumented.
But only developers, that working on Web implementation of engine, can give more accurate answer.

1 Like