• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Offtopic › Delfino Plaza v
« Previous 1 ... 40 41 42 43 44 ... 64 Next »

Glove pie vs Wimote vs Keyboard
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Glove pie vs Wimote vs Keyboard
02-18-2011, 12:09 AM (This post was last modified: 02-18-2011, 12:13 AM by swaty.)
#1
swaty Offline
Junior Member
**
Posts: 41
Threads: 9
Joined: Jan 2010
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!
Gigabyte P55 UD4
i5 -750
Sapphire hd 4870 Toxic
4 Gb DDR3 1333
Win Xp 64
Find
Reply
02-18-2011, 06:16 AM
#2
swaty Offline
Junior Member
**
Posts: 41
Threads: 9
Joined: Jan 2010
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!
Gigabyte P55 UD4
i5 -750
Sapphire hd 4870 Toxic
4 Gb DDR3 1333
Win Xp 64
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode