Dolphin, the GameCube and Wii emulator - Forums

Full Version: Glove pie vs Wimote vs Keyboard
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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!