Fun with Xbox wireless controllers vs Unity:

Within Unity: works correctly.

WebGL on the same Ubuntu machine: sticks work, but the buttons are mapped differently. The right button does one thing within Unity and a different thing in WebGL.

WebGL on MacBook with bluetooth turned off: reacts to keys as if they were controller buttons. (I explicitly examined the “joystick” keycodes within Unity.)

WebGL on MacBook with bluetooth turned on: refuses to connect with or forget bluetooth controllers.

Follow

Ah, wait, the "thinks keys are joystick buttons" is because Input.GetAxis("Player1_Horizontal") looks at a virtual axis, which responds to either keys or sticks. That's the same within Unity. I fixed that by defining another axis to look at.

The other problems appear to be solved by some variant of "turn it off and back on again", except for Ubuntu Firefox mapping the buttons differently from MacOS Firefox.

@lucasgray @Remvst

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.