-
Notifications
You must be signed in to change notification settings - Fork 324
FIX: Gamepad stick inputs are not recognized in WebGL Player (ISXB-1090) #2165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: Gamepad stick inputs are not recognized in WebGL Player (ISXB-1090) #2165
Conversation
8a5ce74
to
7747a0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
var moveAction = map.AddAction("move", type: InputActionType.PassThrough, binding: "<Gamepad>/*stick"); | ||
var submitAction = map.AddAction("submit", type: InputActionType.PassThrough, binding: "<Gamepad>/buttonSouth"); | ||
var cancelAction = map.AddAction("cancel", type: InputActionType.PassThrough, binding: "<Gamepad>/buttonEast"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't reflect ou UI default actions setup. That's why I used the ones we use by default.
Good to have the testcase for WEBGL now, thanks for adding |
Did not forget about this one, will try to check today/tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things checked: different testing scenes on firefox and chrome builds with xbox, ps4 and ps5 controllers both wired and on bluetooth. Everything worked as expected on chrome while on firefox the ps5 controller throws this error below on both wired and bluetooth. And only right side buttons work while analog sticks do not. I don't know if this is for us to fix or something on firefox people so let me know if I should change this to approve instead. (The button behaviour before these changes on firefox is the same except there's no error there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed the firefox issue with Joao and these changes shouldn't have caused it. Will file it separately
We were clamping with the wrong values which would make the UI not react to up and down when using Gamepad sticks.
93445f2
to
4bd2854
Compare
Description
Fixes issue reported here due to WebGLGamepad's not having the stick up/down control values.
To fix the issue, the clamping range for those controls was changed and the test now asserts for the correct values.
Moreover, the UI test was improved so that the actions set-up are
DefaultInputActions
that come by default with UIInputModule. Previously, the test didn't account for a composite binding that are used forleft/right/up/down
controls.These changes to the UITest would have failed with the fix (I confirmed it).
Testing status & QA
Tested in the WebGL player and it fixes the reported issue.
Overall Product Risks
Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.
Checklist
Before review:
Changed
,Fixed
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: