Step 4Programming part1
debug=wiimote.dot1x
if wiimote.dot1y<462 then keyboard.Down=true else keyboard.Down=false
if wiimote.dot1y>562 then keyboard.Up=true else keyboard.Up=false
if wiimote.dot1x<462 then keyboard.Left=true else keyboard.Left=false
if wiimote.dot1x>562 then keyboard.Right=true else keyboard.Right=false
The first line isn't really necessary but it helps you see if your wiimote works properly.
The 2 next lines handles the horizontal aiming. and the last 2 handles the vertical aiming. It does this by pressing the right buttons in the missile launcher software based on where the IR target is. If your missile launcher software uses anything other than the arrow keys for aiming, you will need to tweak the code.
If you have more than one wiimote connected to your pc, then replace the "wiimote" with "wiimote" followed by what number wiimote you want to use. For example, if you use your second wiimote for this you would write "wiimote2". If you are unsure about what number you should use, just put "wiimote" without the number there and GlovePIE will most likely figure it out by itself.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|









































