How to map a Wii Mote to the PC
Moderator: OFC-Giorgio
6 posts
• Page 1 of 1
How to map a Wii Mote to the PC
I was looking for a good script that can map a Wii Mote to the pc. For example I use glovepie and I have this script:
// Here I set the nunchuk so it corresponts with my direction keys.
e = 1.1 > Wiimote1.Nunchuk.JoyX > 0.6
q = -1.1 < Wiimote1.Nunchuk.JoyX < -0.6
s = 1.1 > Wiimote1.Nunchuk.JoyY > 0.6
w = -1.1 < Wiimote1.Nunchuk.JoyY < -0.6
// Nunchuck
numlock = Wiimote.Nunchuk.CButton
space = Wiimote.Nunchuk.ZButton
This is just to simply make it so I can play star wars and move the character forward, back, left, right along with a mouse. I'd love more complicated functions like using the motion controls on the pc but at a minimum I want to see how to do the above glovepie script to make it work on Gtuner. I tried the Call of Duty scripts but they do nothing as it seems like they are made for PS3?
// Here I set the nunchuk so it corresponts with my direction keys.
e = 1.1 > Wiimote1.Nunchuk.JoyX > 0.6
q = -1.1 < Wiimote1.Nunchuk.JoyX < -0.6
s = 1.1 > Wiimote1.Nunchuk.JoyY > 0.6
w = -1.1 < Wiimote1.Nunchuk.JoyY < -0.6
// Nunchuck
numlock = Wiimote.Nunchuk.CButton
space = Wiimote.Nunchuk.ZButton
This is just to simply make it so I can play star wars and move the character forward, back, left, right along with a mouse. I'd love more complicated functions like using the motion controls on the pc but at a minimum I want to see how to do the above glovepie script to make it work on Gtuner. I tried the Call of Duty scripts but they do nothing as it seems like they are made for PS3?
-
nima64 - Private First Class
- Posts: 2
- Joined: Tue Mar 10, 2015 3:10 am
Re: How to map a Wii Mote to the PC
I'm not familiar with glove pie scripting ... what this exactly do?
key e is activate when JoyX is between 0.6 and 1.1 ?
- Code: Select all
e = 1.1 > Wiimote1.Nunchuk.JoyX > 0.6
key e is activate when JoyX is between 0.6 and 1.1 ?
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: How to map a Wii Mote to the PC
So basically it says if I move the Wii Mote Nunchuck joystick up (between 0.6 to 1.1 gradations) then it is equal to hitting the E key. So it moves the character forward. I'm basically trying to emulate or mimic keyboard keys with my wii mote nunchuck joystick.
-
nima64 - Private First Class
- Posts: 2
- Joined: Tue Mar 10, 2015 3:10 am
Re: How to map a Wii Mote to the PC
The closest we can get using GPC script is this:
Side note: With Titan One we can't map the Wiimote inputs to keyboard and/or mouse as Glovepie does. We can only map to a gamepad entries. That is why the script above uses PS4_LEFT, PS4_UP, etc, instead of keyboard key.
- Code: Select all
define WIIIR_DEADZONE = 30;
main {
// Wiimote pointing up
if(get_val(WII_IRY) <= -WIIIR_DEADZONE) {
set_val(PS4_UP, 100);
}
// Wiimote pointing down
else if(get_val(WII_IRY) >= WIIIR_DEADZONE) {
set_val(PS4_DOWN, 100);
}
// Wiimote pointing left
if(get_val(WII_IRX) <= -WIIIR_DEADZONE) {
set_val(PS4_LEFT, 100);
}
// Wiimote pointing right
else if(get_val(WII_IRX) >= WIIIR_DEADZONE) {
set_val(PS4_RIGHT, 100);
}
}
Side note: With Titan One we can't map the Wiimote inputs to keyboard and/or mouse as Glovepie does. We can only map to a gamepad entries. That is why the script above uses PS4_LEFT, PS4_UP, etc, instead of keyboard key.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: How to map a Wii Mote to the PC
I found that if i map IR to register movement beyond the sensor it would make my directional inputs greater and more sensitive that if you.were to get IR offscreen then it would continue with RX And RY and make it so that when I turn the Wii controller the camera starts spinning in any direction i choose instead of stopping dead in its tracks
-
Robsterman02 - First Sergeant
- Posts: 46
- Joined: Mon Sep 05, 2016 12:34 am
Re: How to map a Wii Mote to the PC
This would be critical if you want character movement 100% in any direction otherwise it will stop when reaching off the sensor.
Just add if(get ir_offscreen) then set up the movement on that too
Just add if(get ir_offscreen) then set up the movement on that too
-
Robsterman02 - First Sergeant
- Posts: 46
- Joined: Mon Sep 05, 2016 12:34 am
6 posts
• Page 1 of 1
Return to Wiimote, Nunchuk and Sensorbar
Who is online
Users browsing this forum: No registered users and 22 guests