0 votes


Here's the code I'm trying to test this with:

var is_controller_connected: bool = Input.get_connected_joypads().size() > 0 print("Connected Inhale Controller: " + str(is_controller_connected))

When I run the game in-engine or exporting it to desktop the output will be:

Connected Inhale Controller: True

And of course, the output in the web export is:

Connected Inhale Controller: False

Let me know if there are any workarounds, fixes, or just solutions that could help me out.

Godot version 3.5.1
in Engine by (66 points)

1 Answer

0 votes

I found this article, mentioning that

gamepads cannot be detected on the Web until a button is pressed on them

Could that be the issue? Are you running the check in some _ready or _init function?

by (1,111 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.