Guest User

TrackIR 5 to FreeTrack

a guest
Dec 31st, 2014
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. def update():
  2.     yaw = trackIR.yaw
  3.     pitch = trackIR.pitch
  4.      
  5.     if (enabled):
  6.         freeTrack.yaw = yaw
  7.         freeTrack.pitch = pitch
  8.  
  9. if starting:
  10.     enabled = False
  11.     trackIR.update += update
  12.  
  13. toggle = keyboard.getPressed(Key.Z)
  14.  
  15. if toggle:
  16.     enabled = not enabled
  17.  
  18. diagnostics.watch(freeTrack.yaw)
  19. diagnostics.watch(freeTrack.pitch)
Add Comment
Please, Sign In to add comment