Code: Select all
def update():
global yaw
global roll
global pitch
yaw = -android[0].googleYaw
roll = -android[0].googleRoll
pitch = android[0].googlePitch
if starting:
yaw = 0
roll = 0
pitch = 0
enabled = False
android[0].update += update
diagnostics.watch(yaw)
diagnostics.watch(roll)
diagnostics.watch(pitch)
deltaYaw = filters.delta(yaw)
deltaPitch = filters.delta(pitch)
deltaRoll = filters.delta(roll)
if (enabled):
mouse.deltaX = -deltaYaw*600
mouse.deltaY = -deltaRoll*1000
toggle = keyboard.getPressed(Key.M)
if toggle:
enabled = not enabled
Only thing that comes to mind is maybe the IP is wrong? Is it meant to be my IPv4 Address or my modem address (192.168.1.1). I'm using the modem address.
Okay, pinged the phone to my computer, works fine. And the debug with the IMU are displaying values.
Also, would Oculus games work with this headtracking?.