O'Reilly logo

Cardboard VR Projects for Android by Matt Schoen, Jonathan Linowes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we built the LauncherLobby app, which can be used to launch other Cardboard apps on your device. Rather than using 3D graphics and OpenGL, we implemented this using Android GUI and a virtual cylindrical screen.

The first part of the implementation was largely instructional: how to add a TextView overlay, center it in the view group, and then display it stereoscopically with left/right eye parallax views. Then, we determined the size of the virtual screen, an unraveled cylinder, based on the current physical device size and the current Cardboard device field of view parameters. Objects are scrolled on the virtual screen as the user moves his head left and right (yaw rotation). Finally, we queried the Android device for installed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required