VR Modules
Last updated
Last updated
This page describes how to use the VR modules of the Realvirtual.io XR & Multiuser extension in your realvirtual scene.
Make sure you have correctly set up your device as described in the Setup Guide.
The realvirtual-vr-player prefab enables VR development in your scene.
Search for realvirtual-vr-player and simply drag the prefab into your hierarchy. This initializes the VR development environment in your scene.
The OVRPlayerController manages device tracking and user Input detection. Please refer to the official documentaion of the Meta XR SDK.
The Placer object controlls the behaviour of the placement and allows to adjust the parameters for the placement.
The TransformManager persists the transforms of all the placeables in the scene between multiple runtime sessions. To disable this feature, disable the TransformManager game object.
The XR Environment object initializes the scene setup for optimal use with VR or AR. It manages lighting and core environmental aspects such as ground ans sky.
Placeable objects are game objects that can be moved, rotated and scaledat runtimein VR and AR. Their transforms are persisted across multiple runtime sessions. The previous section describes how the placeables can be manipulated by the user.
In this section, the structure and setup of placeable objects is described.
The SelectionFrame marks the selectable area for picking by the user. The Content object holds the actual placeable content.
To add a new placeable object simply drag the Placeable prefab into your scene. Add all the gameobjects that sould be affected by this placeable as children under the Content game object.
Optionally you can select the SelectionFrame game object and press the recompute button to recompute the bounds of the selection area. To preview the selection area activate the Visual child game object of SelectionFrame.
The PlayerUI holds the main VR user interface enabling the user to trigger various functionalities. The player can toggle the main user menu by pressing the A button on the right controller. The user can switch between 3 operational modes allowing either to navigate in the scene or to reposition placeable objects. Placeables are a special type of object that can be moved, rotated and scaled in VR and AR at runtime. For further information on placeables please refer to In the navigation mode, the user can move around the scene and rotate the view using the thumbsticks on the controllers. In the scene placement mode, the user can pick placeable objects and place them on predefined scene meshes. Any game object in the layer rvSceneMesh having a collider is recognized for placement. In the free placement mode, the user can pick placeable objects and place them freely. The picked object follows the players hand movement. This mode allows high precision placements. In both placement modes, the controller thumbsticks can be used to rotate and scale the object during placement. Further buttons and toggles enable additional features: This button resets the scale of each placeableobject in the scene. This toggle hides or shows a predefined overlay object. This feature is used to quickly toggle some parts of the scene.