VR Camera¶
Camera as a Gameobject¶
The VR Camera is an implementation of SteamVR’s camera and assets from the MAGES SDK. It contains a connection to a generic set of hands created from ORamaVR (UserHands) in order to be the same for any type of commercial HMD used.
Camera Tags & Layers¶
Controller (left) & (right) [Desktop], LeftHandAnchor & RightHandAnchor [Quest] and Generic_MC_L & Generic_MC_R [Vive Focus Plus] 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.
Desktop Camera Setup¶
- Character Controller
On [CameraRig] there is 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 setup in the Project Settings->Physics what layers should be visible by this collider.
- Camera Rig Input Controller
Also the [CameraRig] contains the script Camera Rig Input Controller. It contains all code for the camera movement (x-z translation, rotation, height) using the controllers and keyboard.
- Player’s Hands
The objects Controller (left) and Controller (right) serve as the player’s hands.
- Main Camera
- Under Camera (head), there are the following objects:
Camera (eye): The player’s main camera component.
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.
Camera (ears): A gameobject that acts as the player’s ears.
Target_IK: A gameobject that serves as the target point of avatars (in case they are used).
Oculus Quest Camera Setup¶
- Character Controller
On OVRCameraRig there is the Character Controller component. This is a Capsule Collider used to restrict the camera movement inside the scene.
- Camera Rig Input Controller
Also the OVRCameraRig contains the script Camera Rig Input Controller. It contains all code for the camera movement (x-z translation, rotation, height) using the controllers.
- Player’s Hands
The objects LeftHandAnchor and RightHandAnchor serve as the player’s hands.
- Main Camera
- Under CenterEyeAnchor, (main camera) there are the following objects:
UserUISpawnPointQuest: 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.
GlassesEffect: A gameobject that alters the camera vision, making it darker, like the player is wearing glasses.
Target_IK: A gameobject that serves as the target point of avatars (in case they are used).
Vive Focus Plus Camera Setup¶
- Character Controller
On WaveVR there is the Character Controller component. This is a Capsule Collider used to restrict the camera movement inside the scene.
- Camera Rig Input Controller
Also the WaveVR contains the script Camera Rig Input Controller. It contains all code for the camera movement (x-z translation, rotation, height) using the controllers.
- Player’s Hands
The objects Generic_MC_L and Generic_MC_R serve as the player’s hands.
- Main Camera
- Under head, (main camera) there are the following objects:
UserUISpawnPointVive: 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.
GlassesEffect: A gameobject that alters the camera vision, making it darker, like the player is wearing glasses.
Target_IK: A gameobject that serves as the target point of avatars (in case they are used).