I'm a little rotating teapot

Let's enhance the viewing experience by rotating the model as the user rotates his head. The effect will be different than a "normal" virtual reality experience. Ordinarily, moving one's head in VR rotates the subjective view of the camera in the scene to look around in unison with your head movement. In this project, the head movement will be like an input control rotating the model. The model is at a fixed position in front of you at all times.

To implement this feature is quite simple. The RenderBox preDraw interface method is called at the start of each frame. We'll get the current head angles and rotate the model accordingly, converting the head post-Euler angles into a Quaternion. (Combining multiple Euler angles ...

Get Cardboard VR Projects for Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.