ABSTRACT

Virtual reality (VR), or the simulation of an actual physical presence in a virtual world, has been in the works for a long time. Among all the different headsets that followed the Oculus Rift, Google Cardboard is perhaps the most surprising for its minimalist approach and cheap price, allowing anyone with a mid-range smartphone to easily experience VR for the first time. This chapter describes how to enable VR in Unity. It discusses the demo VR scene included in the “DemoForUnity” package. An easy way to start adding VR support to a new scene is simply to attach the Stereo Controller script to the default main camera so that it will generate a stereo rig when the Update Stereo Cameras button is clicked in the Inspector tab.