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.

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

@peterdrake I'll scream into the void with you - for me, xbox wireless controllers work how I expect in Unity, on mac, on windows.. On the other hand, my wireless SNES controllers - button presses work but built in button navigation is DOA. Fun! BTW using the new InputSystem

@peterdrake if I remember correctly Firefox and Chrome also map buttons differently, so there's that

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.