Showing results for 
Search instead for 
Did you mean: 

How do I get access to the raw Rift data?

Level 2
Hi everyone. This is my first post working with the Oculus version of UDK, but I have a fair amount of experience in UDK, and a little in C++ and C#. I've also soldered together my own custom IMU video game controller. As for what I'm doing here, I'd like to use my own variation on the Kalman filter for calculating the Rift's rotation and I'd like to get access to the magnetometer data.

I'm looking at UDK's Oculus.uc. I see a line for

virtual FQuat GetCurrentOrientation();

and I'm wondering where that goes. I see it's in the cpptext portion and I've never had to work with UDK's C++ sections before. They're not really an impenetrable black box are they?

Level 4
I have not used the UDK, or examined its SDK. But it probably has a lot in common with the OculusVR SDK and examples.

Here is some simple (minimal) sample code to read the tracker data:

It is a simple matter to add magnetometer data to those examples. Just add something like:
vec3 mag = SFusion.GetMagnetometer();

And then use mag.x, mag.y, and mag.z in your code.

Although for "true" raw sensor values, it is a little more complicated, but this is a good place to start.