Head tracking, Opentrack or freePIE?

Post Reply
Ardhal
Two Eyed Hopeful
Posts: 53
Joined: Wed Apr 17, 2013 4:57 am

Head tracking, Opentrack or freePIE?

Post by Ardhal »

Hey guys got a bit of an issue here would love to work through! I'm currently trying to play an OpenGL title (Amnesia) with my Oculus rift dev kit. I am using OculusOverlay to get a correctly warped side by side image of the game in my rift. It's not stereoscopic 3D, but I figure that's okay as long as I can get headtracking.

Except... I can't seem to find a worthy solution? I have spent hours trying to make opentrack 1.8 work:
Image
But whenever I get in game the camera just spins and spins and spins. Is there any way to rectify this behaviour?

I found just one comment on these forums which mentioned freePIE might offer my solution, but I have no clue where to start with that. Can anyone point me in the right direction?
Scofthe7seas
One Eyed Hopeful
Posts: 4
Joined: Tue Aug 27, 2013 9:41 pm

Re: Head tracking, Opentrack or freePIE?

Post by Scofthe7seas »

I was just playing with that a few minutes ago. Trying to get a completely non-supported fairground rides game working. The one I'm playing with, I got working with tri-def and then oculusoverlay, but I couldn't quite get opentrack to go. Is it working for you for mouse-emulation in general? IE when you move the rift, it moves the cursor? One thing I'm not a big fan of with opentrack mouse-emulation is that it takes over the mouse completely. Can't use both :/
I'll try some more tomorrow, when I've been rested and am ready to jump through the 20 hoops needed to get this going.
Ardhal
Two Eyed Hopeful
Posts: 53
Joined: Wed Apr 17, 2013 4:57 am

Re: Head tracking, Opentrack or freePIE?

Post by Ardhal »

Yeah it is moving the mouse on the desktop just fine, as well as in menus during the game, but as soon as I get into the first person camera? It spins like maaaaaaaaad. Absolutley nuts.

Is freePIE actually something that works instead, does anyone know? Or is that for emulating a tracker when you dont actually own one?
mm0zct
Cross Eyed!
Posts: 140
Joined: Thu Nov 19, 2009 9:35 am

Re: Head tracking, Opentrack or freePIE?

Post by mm0zct »

I think I know exactly what's going wrong, although I'm afraid I can't propose a solution just now.

The OpenTrack mouse emulation is emulation absolute mouse position, rather then just sending mouse deltas form where the mouse happens to currently be (this is why you can't use the desktop mouse at the same time, every time head headset tracker runs again it moves the mouse back).

Unfortunately a lot of games reset the mouse to the centre of their game window every frame, and use the mouse delta to work out how much to turn. This is fighting with the OpenTrack mouse emulation with them both moving it to absolute positions and making the game think it's getting a very big offset every frame, making it spin like crazy.

This needs to be fixed on OpenTrack's side of the equation to make the mouse relative. You can check out the source and try rebuilding the mouse plugin yourself if you want. I'll take a look at it if i find some time but I can't make promises on that front.
emmaorabelle
One Eyed Hopeful
Posts: 3
Joined: Thu May 11, 2023 9:53 pm

Re: Head tracking, Opentrack or freePIE?

Post by emmaorabelle »

It sounds like you're experiencing some issues with headtracking in Amnesia while using your Oculus Rift dev kit.
One possible solution you can try is using FreePIE to emulate a mouse for headtracking. Here's how you can do it:
Download and install FreePIE.
Open FreePIE and paste in the following code:

def update():
x, y, z = vjoy[0].x, vjoy[0].y, vjoy[0].z
yaw, pitch, roll = oculus.getOrientation()
new_x = (yaw + 3.1415) * 32768
new_y = (pitch + 3.1415) * 32768
vjoy[0].x, vjoy[0].y = new_x, new_y
vjoy[0].z = (roll + 3.1415) * 32768

if starting:
vjoy[0].setAnalogAxis(0, 0)
vjoy[0].setAnalogAxis(1, 0)
vjoy[0].setAnalogAxis(2, 0)
oculus = io.OculusRift()
Connect your Oculus Rift dev kit to your computer.
Run the script in FreePIE.
Start Amnesia and set the mouse sensitivity to the lowest possible setting.
Press F8 to enable headtracking.
This should enable headtracking in Amnesia while using your Oculus Rift dev kit. If you're still experiencing issues, you may want to try adjusting the settings in FreePIE or checking for updates to the software. exhibit of sorrows
Post Reply

Return to “Oculus VR”