Creating the MeMyselfEye prefab
To begin, we will create an object that will be a proxy for the user in the virtual environment. This will be helpful later on, and it will simplify the conversations in this book, since different VR devices may use different camera assets. Like an empty vessel for your VR soul...
Let's create the object using the following steps:
Open Unity and the project from the last chapter. Then, open the
Diorama
scene by navigating to File | Open Scene (or double-click on the scene object in Project panel, under Assets).From the main menu bar, navigate to GameObject | Create Empty.
Rename the object
MeMyselfEye
(hey, this is VR!).Set its position up close into the scene, at Position (
0
,1.4
,-1.5
).In the Hierarchy panel, drag the Main Camera object into
MeMyselfEye
so that it's a child object.With the Main Camera object selected, reset its transform values (in the Transform panel, in the upper right section, click on the gear icon and select Reset).
The Game view should...