This is an old post on the topic and I have completely re-covered it here

A little Backstory

A couple of months ago I began building a VR-type system (headtracking, HUD etc), with the (rather ambitious) requirement that it would be able to interface into* any game that I throw at it. *I succeeded (mostly), but before I get into that, I’m going to give some story of how it came to be:

V.R – For Noobs?

I first came up with the idea when I (by chance) came across these MyVu devices on eBay:

*Wikipedia:
*

Myvu Personal Media Viewer refers to a product family of wearable video display glasses released by Myvu Corporation.[1]

Myvu provides increased viewing usability and portability for users

*Interesting, I thought. I bought some the next day ;). *After the device was in my possession, I tested it out on the TV – pretty cool stuff… But then I had an idea – what if I could connect these to my computer – playing FPS’s in these’d be awesome! Turns out, though, that these glasses don’t have a VGA interface – I then forked out some money for a vga-to-composite adapter:

Once that had arrived, I started playing *Crysis on these video glasses, but it wasn’t really a fulfilling experience… Still having to use the mouse+keyboard is kinda strange. *And so I thought – if i could find an accelerometer+gyro pretty cheap, I can track the person’s head, and emulate the mouse for games! ( no easy feat, but it seemed like a good idea)

It was then that I found sparkfun electronics, and put these items in my humble cart:

  • Atomic IMU (6 D.O.F )
  • USB FDTI breakout board

One for trackin’, one for interfacin’:

The first pic is the IMU, the thing on the left of the second picture is the FTDI

Oh, and I also got some header strips to connect them as such:

After that was assembled – I just duct-taped it to the side of the video glasses (Not pretty, but works functionally, perfectly)

I now had all the pieces I needed…

Now for the hard part…

I then tasked myself with the objective of writing a program that interprets the accel. values, and translates it into mouse-movements and key-presses so I could use it in any game. I did this with a scripting language – called ‘lite-c’, basically it’s c but with dropped standards and some 3d features built in. As a majority of you won’t understand the syntax, I won’t bother posting any code since I won’t accomplish anything by doing so and, TBQH, the code isn’t very pretty anyway.

Running everything I had, and seeing what I had done so far, a video:

<I actually did end up making the video, but the quality (compression-wise) was so bad that I took it down>

<But then I decided that the post is anticlimactic without it so I put it back ;) – skip to 3:05 to see it working>