Dolphin, the GameCube and Wii emulator - Forums
Glove pie vs Wimote vs Keyboard - Printable Version

+- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org)
+-- Forum: Offtopic (https://forums.dolphin-emu.org/Forum-offtopic)
+--- Forum: Delfino Plaza (https://forums.dolphin-emu.org/Forum-delfino-plaza)
+--- Thread: Glove pie vs Wimote vs Keyboard (/Thread-glove-pie-vs-wimote-vs-keyboard)



Glove pie vs Wimote vs Keyboard - swaty - 02-18-2011

Hi all, im trying to get my wimote as steering wheel for Grid (car game)

iv managed to make the picth go left and right on say a notpad but not in the game. That is when i steer left the curser goes left, that works, but not in the game..? any ideas?!!

here the code


if wiimote.Pitch > 20 degrees
Key.Right = True
wait var.HoldKey
Release(Right)
endif

if wiimote.Pitch < -20 degrees
Key.Left = True
wait var.HoldKey
Release(Left)
endif



If i take away the
wait var.HoldKey
Release(Right)
The steering kinda gets stuck


cheers!


RE: Glove pie vs Wimote vs Keyboard - swaty - 02-18-2011

Welp i got somthing going though its far from perfect, and pretty simple

Code:
var.NewPitch = Wiimote.gZ
var.NumMultiplier =   0.1*0.1



    if var.NewPitch < - 0.20   and   <  var.OldPitch  - 0.001
        Keyboard.Left = 1
        wait (sqrt(sqr(wiimote.Pitch))* var.NumMultiplier ms)
        Keyboard.Left = 0


   elseif  var.NewPitch >  0.20  and  >  var.OldPitch  + 0.001
        Keyboard.Right = 1
        wait (sqrt(sqr(wiimote.Pitch))* var.NumMultiplier ms)
      //wait var.HoldKey
        Keyboard.Right = 0
   else

  
       Keyboard.Left = 0
       Keyboard.Right = 0
   endif

   var.OldPitch=var.NewPitch

Key.Down = Wiimote1.One
Key.Up = Wiimote1.Two


cheers any who!