A head-tracked stereoscopic virtual reality camera rig. More...

Inheritance diagram for OVRCameraRig:

Public Member Functions

virtual void EnsureGameObjectIntegrity ()
 
virtual Matrix4x4 ComputeTrackReferenceMatrix ()
 

Public Attributes

bool usePerEyeCameras = false
 If true, separate cameras will be used for the left and right eyes. More...
 
bool useFixedUpdateForTracking = false
 If true, all tracked anchors are updated in FixedUpdate instead of Update to favor physics fidelity. More...
 
bool disableEyeAnchorCameras = false
 If true, the cameras on the eyeAnchors will be disabled. More...
 

Protected Member Functions

virtual void Awake ()
 
virtual void Start ()
 
virtual void FixedUpdate ()
 
virtual void Update ()
 
virtual void OnDestroy ()
 
virtual void UpdateAnchors (bool updateEyeAnchors, bool updateHandAnchors)
 
virtual void OnBeforeRenderCallback ()
 
virtual void RaiseUpdatedAnchorsEvent ()
 
virtual Transform ConfigureAnchor (Transform root, string name)
 

Protected Attributes

bool _skipUpdate = false
 
readonly string trackingSpaceName = "TrackingSpace"
 
readonly string trackerAnchorName = "TrackerAnchor"
 
readonly string leftEyeAnchorName = "LeftEyeAnchor"
 
readonly string centerEyeAnchorName = "CenterEyeAnchor"
 
readonly string rightEyeAnchorName = "RightEyeAnchor"
 
readonly string leftHandAnchorName = "LeftHandAnchor"
 
readonly string rightHandAnchorName = "RightHandAnchor"
 
readonly string leftControllerAnchorName = "LeftControllerAnchor"
 
readonly string rightControllerAnchorName = "RightControllerAnchor"
 
Camera _centerEyeCamera
 
Camera _leftEyeCamera
 
Camera _rightEyeCamera
 

Properties

Camera leftEyeCamera [get]
 The left eye camera. More...
 
Camera rightEyeCamera [get]
 The right eye camera. More...
 
Transform trackingSpace [get]
 Provides a root transform for all anchors in tracking space. More...
 
Transform leftEyeAnchor [get]
 Always coincides with the pose of the left eye. More...
 
Transform centerEyeAnchor [get]
 Always coincides with average of the left and right eye poses. More...
 
Transform rightEyeAnchor [get]
 Always coincides with the pose of the right eye. More...
 
Transform leftHandAnchor [get]
 Always coincides with the pose of the left hand. More...
 
Transform rightHandAnchor [get]
 Always coincides with the pose of the right hand. More...
 
Transform leftControllerAnchor [get]
 Anchors controller pose to fix offset issues for the left hand. More...
 
Transform rightControllerAnchor [get]
 Anchors controller pose to fix offset issues for the right hand. More...
 
Transform trackerAnchor [get]
 Always coincides with the pose of the sensor. More...
 

Events

System.Action< OVRCameraRigUpdatedAnchors
 Occurs when the eye pose anchors have been set. More...
 

Detailed Description

A head-tracked stereoscopic virtual reality camera rig.

Member Function Documentation

◆ Awake()

virtual void OVRCameraRig.Awake ( )
protectedvirtual

◆ ComputeTrackReferenceMatrix()

virtual Matrix4x4 OVRCameraRig.ComputeTrackReferenceMatrix ( )
virtual

◆ ConfigureAnchor()

virtual Transform OVRCameraRig.ConfigureAnchor ( Transform  root,
string  name 
)
protectedvirtual

◆ EnsureGameObjectIntegrity()

virtual void OVRCameraRig.EnsureGameObjectIntegrity ( )
virtual

◆ FixedUpdate()

virtual void OVRCameraRig.FixedUpdate ( )
protectedvirtual

◆ OnBeforeRenderCallback()

virtual void OVRCameraRig.OnBeforeRenderCallback ( )
protectedvirtual

◆ OnDestroy()

virtual void OVRCameraRig.OnDestroy ( )
protectedvirtual

◆ RaiseUpdatedAnchorsEvent()

virtual void OVRCameraRig.RaiseUpdatedAnchorsEvent ( )
protectedvirtual

◆ Start()

virtual void OVRCameraRig.Start ( )
protectedvirtual

◆ Update()

virtual void OVRCameraRig.Update ( )
protectedvirtual

◆ UpdateAnchors()

virtual void OVRCameraRig.UpdateAnchors ( bool  updateEyeAnchors,
bool  updateHandAnchors 
)
protectedvirtual

Member Data Documentation

◆ _centerEyeCamera

Camera OVRCameraRig._centerEyeCamera
protected

◆ _leftEyeCamera

Camera OVRCameraRig._leftEyeCamera
protected

◆ _rightEyeCamera

Camera OVRCameraRig._rightEyeCamera
protected

◆ _skipUpdate

bool OVRCameraRig._skipUpdate = false
protected

◆ centerEyeAnchorName

readonly string OVRCameraRig.centerEyeAnchorName = "CenterEyeAnchor"
protected

◆ disableEyeAnchorCameras

bool OVRCameraRig.disableEyeAnchorCameras = false

If true, the cameras on the eyeAnchors will be disabled.

Note
: The main camera of the game will be used to provide VR rendering. And the tracking space anchors will still be updated to provide reference poses.

◆ leftControllerAnchorName

readonly string OVRCameraRig.leftControllerAnchorName = "LeftControllerAnchor"
protected

◆ leftEyeAnchorName

readonly string OVRCameraRig.leftEyeAnchorName = "LeftEyeAnchor"
protected

◆ leftHandAnchorName

readonly string OVRCameraRig.leftHandAnchorName = "LeftHandAnchor"
protected

◆ rightControllerAnchorName

readonly string OVRCameraRig.rightControllerAnchorName = "RightControllerAnchor"
protected

◆ rightEyeAnchorName

readonly string OVRCameraRig.rightEyeAnchorName = "RightEyeAnchor"
protected

◆ rightHandAnchorName

readonly string OVRCameraRig.rightHandAnchorName = "RightHandAnchor"
protected

◆ trackerAnchorName

readonly string OVRCameraRig.trackerAnchorName = "TrackerAnchor"
protected

◆ trackingSpaceName

readonly string OVRCameraRig.trackingSpaceName = "TrackingSpace"
protected

◆ useFixedUpdateForTracking

bool OVRCameraRig.useFixedUpdateForTracking = false

If true, all tracked anchors are updated in FixedUpdate instead of Update to favor physics fidelity.

Note
: This will cause visible judder unless you tick exactly once per frame using a custom physics update, because you'll be sampling the position at different times into each frame.

◆ usePerEyeCameras

bool OVRCameraRig.usePerEyeCameras = false

If true, separate cameras will be used for the left and right eyes.

Property Documentation

◆ centerEyeAnchor

Transform OVRCameraRig.centerEyeAnchor
get

Always coincides with average of the left and right eye poses.

◆ leftControllerAnchor

Transform OVRCameraRig.leftControllerAnchor
get

Anchors controller pose to fix offset issues for the left hand.

◆ leftEyeAnchor

Transform OVRCameraRig.leftEyeAnchor
get

Always coincides with the pose of the left eye.

◆ leftEyeCamera

Camera OVRCameraRig.leftEyeCamera
get

The left eye camera.

◆ leftHandAnchor

Transform OVRCameraRig.leftHandAnchor
get

Always coincides with the pose of the left hand.

◆ rightControllerAnchor

Transform OVRCameraRig.rightControllerAnchor
get

Anchors controller pose to fix offset issues for the right hand.

◆ rightEyeAnchor

Transform OVRCameraRig.rightEyeAnchor
get

Always coincides with the pose of the right eye.

◆ rightEyeCamera

Camera OVRCameraRig.rightEyeCamera
get

The right eye camera.

◆ rightHandAnchor

Transform OVRCameraRig.rightHandAnchor
get

Always coincides with the pose of the right hand.

◆ trackerAnchor

Transform OVRCameraRig.trackerAnchor
get

Always coincides with the pose of the sensor.

◆ trackingSpace

Transform OVRCameraRig.trackingSpace
get

Provides a root transform for all anchors in tracking space.

Event Documentation

◆ UpdatedAnchors

System.Action<OVRCameraRig> OVRCameraRig.UpdatedAnchors

Occurs when the eye pose anchors have been set.


The documentation for this class was generated from the following file: