Skip to content
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

Mapping doesn't include LT and RT axis #37

Open
klianc09 opened this issue May 31, 2023 · 2 comments
Open

Mapping doesn't include LT and RT axis #37

klianc09 opened this issue May 31, 2023 · 2 comments

Comments

@klianc09
Copy link
Contributor

The getMapping() is pretty useful, but it only includes any buttons that might be mapped to L2/R2, but for those gamepads that have triggers the mapping should also include the axis for both the left and right trigger (LT/RT).

At least on desktop the trigger seem to be properly mapped to their axis. So instead of using the mapping I've currently just hardcoded LT to axis 4 and RT to axis 5.

If it's difficult to determine what's the axis on other platforms, maybe those would just have -1 in there until someone implements it.

@MrStahlfelge
Copy link
Member

IIRC the buttons are mapped to buttons on all other platforms, but I might remember wrong. I am open for all good suggestions but someone has to take a look on all the platforms for this. :)

@klianc09
Copy link
Contributor Author

klianc09 commented Jun 1, 2023

I was testing with a bluetooth controller on android and to my surprise the trigger was mapped to both an axis and a button. So could be the case that on the other platforms the trigger is always mapped to a button. Which would make desktop the odd one out.

IDK, I handle desktop as an edge case at the moment, which would be cool to not be necessary, but it's not such a big deal to be worth much effort.
I guess at least this issue can act as a documentation of this quirk for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants