VR Camera

Camera as a GameObject

From MAGES 3.3.0 we use the Universal XR camera. A single camera instance to manage all the XR devices.

Camera Tags & Layers

Controller (left) & (right) [Desktop] must both be in the layer UserHands and the first one must have the tag LeftPalm and the second one the RightHand. This involves all their children too. Above them the CameraRig [Desktop], OVRCameraRig [Quest], WaveVR [Vive Focus Plus] where the collider for the camera is located, the layer CameraRig must be applied. Only for that specific gameobject and not its children.

UserHands Gameobject

On the children-gameObjects HandL & HandR, it is attached the script Animation Controller. As the name implies it controls all the animations for the hand depending on what button the user is pressing (e.g. pressing the trigger button, it plays the animation for the index finger). Also, an animator component is attached with the hand’s animation.

Universal XR Camera Setup


This object contains the Character Controller component. This is a Capsule Collider used to restrict the camera movement inside the scene. As explained before this specific gameobject is the only child in the VRCamera that has the layer CameraRig. The developers should set up in the Project Settings → Physics what layers should be visible by this collider.

The UniversalCameraMovement script is responsible for the movement within the VR using the controllers.

Additionally, the KeyboardMovement script enables movement from the keyboard as well.

  1. UserUISpawnPoint: A gameObject that only counts as a reference for UI positioning. It faces the Camera Eye with a slight offset in the forward axis. Its purpose is to be the spawn point for every UI that gets spawned.

  2. Target_IK: A gameObject that serves as the target point of avatars (in case they are used).

LeftController and RightController

Contains the players virtual hands. The ConnectedPoint gameObjects reflecting the position of the controllers.

VR Camera