-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Switch Joy-Con (Left / Right) support on macOS #6269
Comments
You should receive events for |
Just checking on the current state of this. I tested JoyCon on macOS with bevy main and If I connect one JoyCon at a time, I get some events, but the mapping doesn't seem to make sense with any controller orientation. If I connect the matching JoyCon, I see a connection event for that particular JoyCon, but afterwards I get no events at all when pressing buttons. (This behavior is the same in Testing with L JoyCon
Testing with R JoyCon
I didn't test as thoroughly on the
and the mapping for directional buttons seems similar. |
I don't know if I am going to keep working on this, so to summarize my findings:
|
Bevy version
6b75589
[Optional] Relevant system information
macOS 12.6
What you did
When I connect a single Switch Joy-Con (either left or right) to my Mac via bluetooth the D-Pad (left right up down) is not being registered. E.g. moving it doesn't generate any events in Bevy. The buttons (a, b, x, y) work fine.
What went wrong
I tracked the issue down to two places:
EvCode
forHat
types. I created a PR for that.When I use my
gilrs
fork and when I change thebevy_gilrs/converter.rs
locally to:Then I get the correct events and I can use my Joy-Con's for controlling a Bevy game. However I don't have enough knowledge about this code to know why the filter for D-Pad events existed in the first place. I'll happily create a PR with these changes if somebody who understands this can confirm that this is indeed a useful solution.
The text was updated successfully, but these errors were encountered: