Once the VR mode is entered after the user pressed the “VR”
button on the bottom right of the screen, the Wonderland Engine
autmatically starts rendering in stereo.
“Stereo” means that there is two views rendered: One for the
left and one for the right eye. The opposite is “mono”, which
is a single view.
Up till now, we had only one view set up, which represents
either the “center eye” for mono rendering, or in stereo
would represent the left eye.
We need to add a second view to allow the right eye to
be rendered aswell.
For that, we add a second object “RightEye” with a view component,
as we want the left and right eyes at different positions eventually.
Since we still need a single object to control the player position,
we add a common root for the left and right eye called “Player”.
This way we only have to move one object rather than each
The final setup looks like this:
To make the camera follow the user’s head, you need to add “input”
components. Input components read various forms of input and apply
it to the object they are added to.
To both “Camera” and “RightEye” add a input component each, with the
type set to eye left and eye right.
The position of the two view objects is now controlled by the
input component. To avoid confusion, we reset the position of “Camera”
and move “Player” to the desired position instead.
Do that by selecting “Camera”, then double click each translation
input field and type 0.
Finally, select “Player” and use the translation Gizmo to move it to
a position infront of the house.
View on Oculus Quest
Click “Package” and “Start Server”. That starts the local webserver which
will serve the game page.