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

WIP - WiimoteEmu: Improve emulated swing. #7973



2 participants
Copy link

jordan-woyak commented Apr 10, 2019

I've replaced the hard to comprehend "Jerk" setting with a "Speed", measured in m/s.
Default: 8 m/s (Range is 1 - 40)

The jerk required to reach this velocity when traveling 1 meter is used to "move" the emulated wiimote.
This results in an exponentially increasing jerk with a linear increase in the "Speed" setting which is a more friendly interface.

I've added a "Return Speed" setting which is used to move the emulated wiimote back to its neutral position after a swing.
This stops the release of swing buttons from triggering actions in games.
Default: 2 m/s

The emulated wiimote is now moved backwards and with a twist in the direction of the swing to simulate the motions one would make with their arm.
The mapping indicator shows this with some curved lines.

The swing emulation code is getting a little more ugly than I'd like but short of pulling in a physics library I don't think it can be much cleaner while maintaining this functionality.

No More Heroes 1 and 2
"Fatalities" are now detected with a single swing "press" on either keyboard or analog stick.
The rotational actions also work with analog sticks or circular key mashing.

More testing with more games.
Are "Speed" and "Return Speed" the best names for these settings?


This comment has been minimized.

Copy link

iwubcode commented Apr 10, 2019

I played a few games tonight to see how this did and it works quite well.

No More Heroes - initially I ran into some minor issues with this game on the default settings but after playing another game and tweaking the settings, I came back and found it immensely satisfying.
Spectrobes Origins - was able to do the usual commands to the spectrobes and finish the excavation tutorial
Wii Sports - played some tennis, had a great volley with the CPU 😛 .

All n all I think this is a game changer. Controls feel very responsive now.

I will test more games in the next day or two. Thank you @jordan-woyak !


This comment has been minimized.

Copy link

iwubcode commented Apr 14, 2019

A couple more games played today:

Deadly Creatures - I haven't tried this on master but I was able to execute the Wii swing motions easily. I did have trouble with the Scorpion's 'Dash' move which is supposedly activated by a Nunchuk down-swing.
Red Steel - in contrast, I was able to execute the 'flip the table' move in Red Steel with emulated nunchuk controls.


This comment has been minimized.

Copy link
Member Author

jordan-woyak commented Apr 16, 2019

I'm just going to include these improvements in my M+ PR #7861.

@jordan-woyak jordan-woyak deleted the jordan-woyak:swing-improve-2 branch Apr 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.