For some time i was trying to make my own "diy rift" for gaming.
I tried some tracking ways to emulate a mouse but all seem to be laggy and not so good.
I saw the features that freePie can give us and i tried to make it work with my phone. Sadly, no success at all.
I am using the android free pie imu apk installed on my htc one m8, freepie 1.8 installed on my pc and i tride the following codes:
Code: Select all
Android mouse emulation with deadband and continous yaw
def update():
#Apply deadband filter to avoid drift
#And continousRotation filter to yaw axis to avoid jumps when passing tracker center
x = filters.deadband(filters.delta(math.degrees(filters.continousRotation(android[0].yaw))), deadband)
y = filters.deadband(filters.delta(math.degrees(android[0].pitch)), deadband)
mouse.deltaX = x * multiply
mouse.deltaY = y * multiply
if starting:
deadband = 0.01
multiply = 5
android[0].update += update
Code: Select all
TrackIR mouse emulation
#Use Z to toggle on/off and right mouse to activate head tracking
#(Good for games like Battlefield 3)
def update():
yaw = trackIR.yaw
pitch = trackIR.pitch
deltaYaw = filters.delta(yaw)
deltaPitch = filters.delta(pitch)
if (enabled and hotkey):
mouse.deltaX = deltaYaw*multiply
mouse.deltaY = -deltaPitch*multiply
if starting:
enabled = False
multiply = 20
trackIR.update += update
hotkey = mouse.rightButton
toggle = keyboard.getPressed(Key.Z)
if toggle:
enabled = not enabled
Another thing i have to ask is about freetrack.
As soon as i use the python code from "script examples" android > freetrack i have to use the freetrack software to "catch" the readings from my phone? I have freetrack installed since i used it for the past way to track my movement.
Can anyone put a lil' "tutorial" on how to run this on my phone?
I would like to use the memory sharing track from vireio but the vireioSMT plugin seems not to work with this version of freepie. I cannot start it with vireioSMT plugin installed.
And another little thing, could i emulate the combined readings by my phone's sensors as a HMD? Some games which have native 3d support have to "detect" hmds for "full support".
I look forward for your answers!
Thank you very much!