3 Pulling Data Out of the Rift: Working with the Head Tracker
This chapter covers
- • How the head tracker works, what it reports, and how to access tracker data
- • Using the head tracker API to fetch an orientation
- • Applying the new orientation to a rendered scene
- • Using gravimetric and magnetic drift correction
- • Using prediction to reduce latency
For some users of the Rift, the first impression is, yeah, that’s a nice view. They aren’t really wowed. Then, they move their head, and that’s when it hits them. They break into a huge grin and make a 360 degree spin just to take it all in. The sense of immersion they get from having their point of view be consistent with where they are looking completely sells them on the experience.
The Rift includes the hardware that lets us track head movement, but how do we use it to create an immersive experience? By coming to our sensors.
The Oculus Rift includes solid state circuitry that reports the device’s current acceleration and angular velocity as vectors up to 1000 times a second. By combining these individual hardware reports, the Rift SDK is able to provide a continuous representation of the current orientation of the Rift in three dimensions.
3.1 The head tracker API
Access to the head tracker hardware is provided via an ovrHmd
handle, the acquisition of which was covered in Chapter 2.