Using the search I discovered a well of knowledge on how to emulate hydra with freepie. Im trying to use my android phone but it is not working as expected.
Is this function still working?
I can see in the watch tab that it is picking up the gyro. In my Android UMI app I can see it detecting the orientation and it is.
In mincrift I can get past the hydra calibration. Soon as center the orientation and move the phone it does not move in any correct direction in correlation to the phones orientation.
The code:
Code: Select all
def update():
global yaw
yaw = math.degrees(android[0].yaw)
global pitch
pitch = math.degrees(android[0].pitch)
global roll
roll = math.degrees(android[0].roll)
if starting:
centerYaw = 0
centerPitch = 0
centerRoll = 0
yaw = 0
pitch = 0
roll = 0
android[0].update += update
hydra[0].yaw = yaw - centerYaw
hydra[0].pitch = pitch - centerPitch
hydra[0].roll = roll - centerRoll
diagnostics.watch(hydra[0].yaw)
diagnostics.watch(hydra[0].pitch)
diagnostics.watch(hydra[0].roll)
if keyboard.getKeyDown(Key.Z):
centerYaw = yaw
centerPitch = pitch
centerRoll = roll
if keyboard.getKeyDown(Key.O):
hydra[0].trigger = 1
if keyboard.getKeyDown(Key.P):
hydra[1].trigger = 1
What I tried:
I have tried changing switch on the android app the raw data and orientation on and off.
I've tried changing the yaw,pitch,roll to -android[0].yaw and android[0].googleYaw etc.
Also tried playing with setting sensativity in mincrift but it would just spin the screen around.
Relavent Info:
Phone: Samsung Galaxy S5 s906K
Freepie version: 1.9.6
Minecrift vers: 1.8.1 hydra enabled
If anyone has figured this out could you please pass on your code so I can learn from you.
JP