Add angle snapping to better support circular analog sticks#569
Conversation
…rt circular design controllers
|
I'll see how that feels and report backm can take a week tho, need to find my N64 controller adapter as well |
|
For the best effect I recommend using a circular design analog stick controller like the xbox controller. Currently I'm using 16 degrees and 75% and find many things feel more like they would on a classic controller. It's especially evident on things like backwalking in OoT/MM, which regularly requires a very correct angle and other related tricks. |
|
I will be testing nintendo switch joycon and a real n64 controller |
|
Also i think this might be evident in glover too, that always feels a bit janky for some reason |
|
Okay, I'm looking forward to the result. Since the analog stick is notched on these, I don't know if the effect will be too evident besides correcting hardware related discrepancies |
|
"ideally" they should have no real impact on n64 controller, but only one way to find out |
|
Feels great, right? |
|
Haven't gotten around testing yet but thanks for the reminder |
|
Still some holdsups... I hope to get around to it this week |
|
Any updates on your tests @m4xw ? In the meantime I have added this change to another core who have long since merged it :D |
I've ran into some unrelated issues with my game controllers :/ I'd be up to merge it blind if we gate it off by default.
|
|
Hey, the current approach is octagonal if I understand you correctly (I'm snapping to the next 45 degree angle, 360/45 = 8) |
Oh thats what i remembered but when i looked at the code right now it just looked like it snaps on 4 axis, didnt have my coffee yet mind you. |
|
Hey @m4xw , I never explicitly commented on the default value question: The set values are in my opinion close to optimal for emulating the original hardware feeling and I use these settings daily for my Zelda Speedruns/Randos. |
|
@halest hey man, I put in this input-related PR awhile back, as well: #581 and it doesn't look like they conflict, exactly (basically, yours would affect the default analog handling and be bypassed if mine is enabled, I think?), but if mine is merged, it's going to move around where yours fits in. Would you be up for testing that interaction? |
|
@hizzlekizzle Hey, awesome, thanks for the heads up. I have pretty much given um on this ever being merged and switched to another core. They merged it within days but I can recreate this setup and test it with you, absolutely. Probably not before some time next week though if that's alright. |
|
Sure, no big hurry. Thanks! |
if i didnt plan on merging it, i wouldve closed it long ago. If you both settle on what we gonna merge, i am gonna go ahead |

This change is the result of this discussion.
I will also add the text at the bottom.
The goal of this change is to make circular design analog sticks (like on the XBox-Controller) behave much more closely to the notched controllers that were originally used on the N64 or the GameCube.
These commits introduce three new settings:
These are used as follows:
astick-snap-active: Enable / Disable analog stick angle snapping
astick-snap-max-angle: The maximum angle offset that will snap to the nearest cardinal direction. Example: A setting of 5 will snap 85 to 95 to 90. A setting of 10 will snap 80 to 100 to 90.
astick-snap-min-displacement-percent: The classic, notched controllers will only guide you to a cardinal direction when the stick displacement from the center is close to a maximum. This allows full freedom on slower movement. This setting, if for example set to 80% will only snap to the next cardinal direction as soon as the stick is at least 80% to its' maximum displacement from the center.
Thank you for your consideration.
Halest
Here's what was originally said:
Many emulators have a setting to snap the control stick to cardinal directions to simulate a notched control stick like on the N64 or GameCube controller.
Usually this includes a setting, which offsets to snap to the nearest cardinal direction.
For example the setting is set to "5", angles from 85 to 95 would snap to 90.
Why