How would I handle the update() function in this case?
(If it's helpful, here's the code I've got.
Code: Select all
def update():
global yaw
yaw = vuzix.yaw
global pitch
pitch = -vuzix.roll
global roll
roll = vuzix.pitch
if starting:
centerYaw = 0
centerPitch = 0
centerRoll = 0
yaw = 0
pitch = 0
roll = 0
vuzix.update += update #This part doesn't work.
trackIR.yaw = yaw - centerYaw
trackIR.pitch = pitch - centerPitch
trackIR.roll = roll - centerRoll
if keyboard.getKeyDown(Key.LeftControl) and keyboard.getPressed(Key.C):
centerYaw = yaw
centerPitch = pitch
centerRoll = roll