I was wondering if anyone has the complete mapping for a Nintendo Switch Pro Controller. Im mostly interested in the D-Pad mapping. I’ve got everything else mapped for the controller (on a Mac, via bluetooth). I’ll try to get that posted ASAP. If anyone wants to add to this, that would be great.
I have been looking around, and I know there is a mapping for a Joycon controller, but its not the same as the switch’s pro controller. I’m actually surprised that this hasn’t been done yet, so I’m going to try to be the pioneer here, and make a diagram for the rest of us.
This is what I have so far, if anyone has any additional details, that would be fantastic. Thank you.
EDIT: I have figured out the D-pads. The horizontal D-pad is on the 11th axis. The vertical is on the 12 axis. I have updated the diagram below.
After trying everything inside the Unity editor, I could not figure out how to get the joysticks to work on the Mac. If anyone knows the answer to this, It’d be much appreciated. Im also noticing that most programs and emulators on Mac have a particularly tough time getting the joysticks to work properly on the Mac. maybe there is a third-party driver that can be used rather than just going off of the vanilla driver?
@smidty@Dementio Have you figured out what the mapping is for the analog sticks on Mac? I’ve manually gone through all 28 Axises, trying to find one that would work, on both vertical and horizontal, and nothing worked. This is my first attempt at programming for analog sticks, so maybe I’m going about this the wrong way?
I got as far as getting all buttons to work.
But still struggling with the joysticks.
Trying to search the web for solutions. But nothing yet.
Any one got this last puzzle pice to work?
Same here: the above mapping is correct, but I can get nothing from the sticks.
However, I tried a wired Switch controller (not the Pro Controller connected by USB). And that maps the sticks to X, Y, 3 and 4 just as you’d hope, and the stick, shoulder and central buttons as for the Pro Controller. But the D-pad is on axes 5 and 6, and the other 4 buttons are shifted round: Y is 0, B 1, A 2 and X 3.
(I’m also working with an XBox One controller, which numbers its buttons down from 19, puts the triggers on axes and the D-pad on buttons.)
Just to add on some additional information here. Another issue you may find with the switch pro controller even after adding the controllers is that the getaxis and getaxisraw values reported by the analog sticks are not accurate (at least from my experience). For some reason they report drastically larger numbers which causes getaxis values to snap to 1 or -1 very quickly (i.e. no gradual build up from 0, 0.1, 0.2, etc).
These values can be affected by having steam run at the same time as unity as well as any other application that uses the controller and applies a configuration to it. I tried to use x360ce to emulate a xbox controller, but had a whole other set of issues in trying to get that to work with my computer.
I think there needs to be some official drivers that work better here instead of plug and play. Another random tidbit - using the pro controller via bluetooth worked much better for me than using it through usb.
Have you figured out the sticks yet @smidty
– crusaderWR84how would I use this event code? like how would I list the key code for the buttons?
– olivea148