Remapping Motion Controls?
Moderator: OFC-Giorgio
4 posts
• Page 1 of 1
Remapping Motion Controls?
So, im trying to get the motion control of the Wii Remote to match that of the right stick on a PS4 controller for Smash Ultimate. Back in Brawl, you could use "Shake Smash" where you shake the controller, for example, up, and it counts as hitting up on the right stick. I have it semi-working, however both up and downwards count as hitting up on the right stick. Also, while Left and Right work fine with just little shakes to the side, Up and Down need really exaggerated shakes for it to register. I dont know much for programming, but tried it out anyway, which results in these issues.
This is what I have specifically for the motion control.
This is what I have specifically for the motion control.
- Code: Select all
if (get_val(WII_ACCX) <= -1) {set_val(PS4_RX, 100);
if (get_val(WII_ACCX) >= 1) {set_val(PS4_RX, -100);
if (get_val(WII_ACCY) <= -1) {set_val(PS4_RY, 100);
if (get_val(WII_ACCY) >= 1) {set_val(PS4_RY, -100);
if (get_val(WII_ACCX) == 1) {set_val(PS4_RX, 0);
if (get_val(WII_ACCY) == 1) {set_val(PS4_RY, 0);
Last edited by Mizumi on Sat Mar 02, 2019 1:31 am, edited 1 time in total.
-
Mizumi - Private First Class
- Posts: 2
- Joined: Sat Mar 02, 2019 12:56 am
Re: Remapping Motion Control
Here are the values for the PS4 sticks, the forwards and backwards are reversed to how most people think about it. The directions are assuming that you are holding the PS4 controller in your hands at the time.
Stick FWD = -100 (negative value)
Stick BACK = 100
Stick RIGHT = 100
Stick LEFT = -100 (negative value)
Stick FWD = -100 (negative value)
Stick BACK = 100
Stick RIGHT = 100
Stick LEFT = -100 (negative value)
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: Remapping Motion Control
UK_Wildcats_Fans wrote:Here are the values for the PS4 sticks, the forwards and backwards are reversed to how most people think about it. The directions are assuming that you are holding the PS4 controller in your hands at the time.
Stick FWD = -100 (negative value)
Stick BACK = 100
Stick RIGHT = 100
Stick LEFT = -100 (negative value)
yeah, after messing around with the values i got it. however it doesnt explain why downwards motion is registered as upwards.
-
Mizumi - Private First Class
- Posts: 2
- Joined: Sat Mar 02, 2019 12:56 am
Re: Remapping Motion Controls?
I am not familiar with the Wii and Titan. Maybe this will help.
OFC-Giorgio wrote:The nunchuck gyro movement is indicated by WII_ACCNX, WII_ACCNY and WII_ACCNZ.
The wiimote gyro movement is indicated by WII_ACCX, WII_ACCY and WII_ACCZ.
I only used WII_ACCX with values greater than 20 to detect the twisting of the wiimote:
if(get_val(WII_PLUS) && get_val(WII_ACCX) > 20)
To detect the shaking of the nunchuk one has to find out which of the WII_ACCNX, WII_ACCNY and WII_ACCNZ can be used and with what values. Maybe we should store these value between a few rounds (of the main loop) to determine e.g. that the nunchuk z value is first 0 (start), next 30 (up) and finally 0 (down again) to qualify as a "shake".
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
4 posts
• Page 1 of 1
Return to Wiimote, Nunchuk and Sensorbar
Who is online
Users browsing this forum: No registered users and 89 guests