Mapping Oculus Rift movement to mouse with FreePIE

Official forum for open source FreePIE discussion and development.
Post Reply
Robert99
One Eyed Hopeful
Posts: 3
Joined: Tue Aug 04, 2015 6:29 am

Mapping Oculus Rift movement to mouse with FreePIE

Post by Robert99 »

Hi,
I'm having some trouble finding specific information for this... I'd like to use Oculus Rift DK2 with older games (they don't have any compatibility with Oculus, and probably never will)
Is there a way to simply convert the head movements (rotation only, not position) to mouse movements? So windows "thinks" I'm just using a mouse? This way, Oculus would be compatible with pretty much every game that uses mouse.
(In other words, convert Oculus to some kind of Gyromouse, and if I press "W" to move forward, the character goes to where I'm lookng at... Just like if I was using a regular mouse)

I found this topic in this forum: http://www.mtbs3d.com/phpBB/viewtopic.php?f=139&t=19619
Is this exactly what I'm looking for? (does that script makes windows thinks I'm using a mouse, when I'm actually using Oculus Rift DK2? Can I actually move the Windows arrow with my head? Therefore, making this compatible with pretty much every mouse game?)

I'm aware I would lose other great stuff like the head position and 3d stereoscopy. But I'd be glad if I could use Oculus with older games, even if the image is in 2D (as long as head movement works in 360 degrees)
I just wan't to make sure that topic is exactly what I'm looking for...

(In short, I want to use Oculus just like a regular mouse, making it compatible with every mouse game, and the character should move to where I'm looking at)

I really appreciate if someone could clarify this for me

Thank you very much!
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: Mapping Oculus Rift movement to mouse with FreePIE

Post by cybereality »

Not sure about FreePIE but you can emulate mouse movements with C++. I basically wrote something just like this years ago for the Vuzix VR1200. I released the source code here: http://www.mtbs3d.com/phpbb/viewtopic.p ... 40#p103579 . Most of that is just working with the Vuzix SDK, the core is a Windows function called SendInput ( https://msdn.microsoft.com/en-us/librar ... s.85).aspx and https://msdn.microsoft.com/en-us/librar ... s.85).aspx ). If you know any C++ or WinAPI this will be fairly straight-forward.

However, it won't really help you. This is because the Rift is not like a monitor, and you can't view 2D content with it. It only works with content specially designed for the format (meaning SBS split-screen, not squished, and with distortion and chromatic correction). So you would still need some sort of injection driver to convert the game image into something that you can view on the Rift. That said, making a 2D VR cinema type app is fairly simple once you have injection working and this is already possible with some 3rd party apps out there.

So feel free to investigate further, but you'll probably find what you're looking for is not as great as you think.
Robert99
One Eyed Hopeful
Posts: 3
Joined: Tue Aug 04, 2015 6:29 am

Re: Mapping Oculus Rift movement to mouse with FreePIE

Post by Robert99 »

cybereality wrote: I basically wrote something just like this years ago for the Vuzix VR1200. I released the source code here: http://www.mtbs3d.com/phpbb/viewtopic.p ... 40#p103579
I just checked the first page. Your app and it looks amazing! (It might sound strange, but I actually want to use Oculus for mouse movement, exactly like you did in the video)

Ok I think I understand what you mean about the injection driver. Would I be able to use your app with something like VorpX? (or Tridef)

Thank you for the help! ;)

(One more question, I tried your app just to see what it looks like. It crashed as soon as I tried it, Could that be because I don't have an Oculus Rift yet? or is it Operative system limitation? I'm using Windows 7 64Bit, let me know if you want more details)
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: Mapping Oculus Rift movement to mouse with FreePIE

Post by cybereality »

That app is old, and was for the Vuzix headset. I think when I wrote it I was on Vista 32-bit, never tested it on anything else.

Also, it does not work with the Oculus Rift, and may not work at all without a Vuzix headset.
Robert99
One Eyed Hopeful
Posts: 3
Joined: Tue Aug 04, 2015 6:29 am

Re: Mapping Oculus Rift movement to mouse with FreePIE

Post by Robert99 »

That's sad, it really looks like a cool app.

In that case I'm back to FreePIE. I just want someone to confirm if the script does what I asked in my first post (In other words, it should do exactly what I saw in your video, convert head movement to mouse, and even control the Windows arrow)

Thank you
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Mapping Oculus Rift movement to mouse with FreePIE

Post by CyberVillain »

You can use the Android example and change to oculus

http://andersmalmgren.github.io/FreePIE/samples.html

change android[0].yaw to oculusVR.yaw etc
Post Reply

Return to “FreePIE”