So here's my issue:
I want to play Vireio Perception (+ VR Boost) enhanced games on my Colocross Headset + Galaxy S5 (I'm currently trying to build my DIY Rift-like with 2K lcd and DIY sensors) to be able to get Pitch, Yaw and Roll working (and possibly positional tracking using Freetrack + Camera + IR Leds, but that'll be for later)
So far I've tried the Freetrack option of Vireio, Opentrack receiving the sensors data from Trinus VR (my phone) and output Freetrack. Vireio doesn't sees it (too bad, it works with any TrackIR/Freetrack enhanced games!)
So I still have the Shared Memory Tracker option, which uses FreePie.
I'm totally new to scripting this kind of things, so I wonder... How can FreePie get my phones sensors data (I tried Freepie Redirect & FreepieIO in Trinus, with many scripts found here and there... not working) and output it as Shared Memory Tracker to make Vireio recognize the headtracking.
I already have the vireioSMT.dll in my FreePie plugin directory
Any leads guys? I'm totally stuck with this, and honestly after playing TrackIR/Freetrack enhanced games, I don't want to play games through Mous Emulation anymore, it's just so wrong!
Thanks!
Edit: This issue is solved, with this code, I can play Left4Dead 1 & 2 on 3 DOF using my Phone (Android), Trinus VR, OpenTrack, FreePie and Vireio Perception:
1. Trinus VR (Sensor Output: OpenTrack Redirect), Sensors on defaut port (5555).
2. OpenTrack on UDP sender (Port 5556), Protocol freetrack 2.0 Enhanced.
3. FreePie with this script:
Code: Select all
def update():
# We define here names of TrackIR imputs to make the script easier
global Yaw #trackIR.yaw will be named Yaw, we have to precise it in the next lines (Line 11 to 16)
global Pitch
global Roll
global Xaxis
global Yaxis
global Zaxis
#For exemple "Yaw = trackIR.yaw", mean the imput "trackIR.yaw" will be named Yaw in our script
Yaw = -trackIR.yaw / 55.0
Pitch = trackIR.pitch / 55.0
Roll = trackIR.roll / 120.0
Xaxis = trackIR.x / 5.0 #Positional Tracking
Yaxis = trackIR.y / 5.0 #Positional Tracking
Zaxis = trackIR.z / 5.0 #Positional Tracking
# "/ 50.0" mean the imput received from trackIR will be 50 times smaller when sent to Vireio's Shared Memory Tracker, change this values according to your experience in-game (I use this with Left 4 Dead)
#Assigning TrackIR imputs to Vireio's Shared Memory Tracker imputs
vireioSMT.yaw = Yaw - centerYaw
vireioSMT.pitch = Pitch - centerPitch
vireioSMT.roll = Roll - centerRoll
vireioSMT.x = Xaxis - centerXaxis
vireioSMT.y = Yaxis - centerYaxis
vireioSMT.z = Zaxis - centerZaxis
#Setting all vallues to 0 when starting, make sure your tracking device is in the right direction before starting the script
if starting:
centerYaw = 0 #We define the center of Yaw to 0, same for all the "center" lines
centerPitch = 0
centerRoll = 0
centerXaxis = 0
centerYaxis = 0
centerZaxis = 0
Yaw = 0
Pitch = 0
Roll = 0
Xaxis = 0
Yaxis = 0
Zaxis = 0
trackIR.update += update #Thanks to this line, FreePie will start updating Vireio's Shared Memory Tracker (receiving imput from TrackIR)
# Assigning an imput to re-center in case of drifting, here "K", can be changed up to your tastes
if keyboard.getPressed(Key.K):
centerYaw = Yaw #Freepie will set to "Yaw" the same value as "centerYaw" (0) meaning that Yaw will be back to its initial position, same for other lines bellow
centerPitch = Pitch
centerRoll = Roll
centerXaxis = Xaxis
centerYaxis = Yaxis
centerZaxis = Zaxis
#The lines bellow are only for test purpose within FreePie, delete them once you're done to save some CPU power
diagnostics.watch(trackIR.yaw)
diagnostics.watch(trackIR.pitch)
diagnostics.watch(trackIR.roll)
diagnostics.watch(trackIR.x)
diagnostics.watch(trackIR.y)
diagnostics.watch(trackIR.z)
diagnostics.watch(vireioSMT.yaw)
diagnostics.watch(vireioSMT.pitch)
diagnostics.watch(vireioSMT.roll)
diagnostics.watch(vireioSMT.x)
diagnostics.watch(vireioSMT.y)
diagnostics.watch(vireioSMT.z)
4. Vireio Perception in Side-by-Side, Shared Memory Tracker
5. Launched Trinus VR Server (I don't use the FreePie APK, due to difficulties to get the right network configuration playing with the WiFi Hotspot of Trinus), Started OpenTrack, Launched FreePie script and... The Game (Left 4 Dead)