API reference
API reference
Select your platform
No SDKs available
No versions available

OVRCameraRig Class

Extends MonoBehaviour
A head-tracked stereoscopic virtual reality camera rig.

Properties

The left eye camera.
The right eye camera.
Provides a root transform for all anchors in tracking space.
Always coincides with the pose of the left eye.
Always coincides with average of the left and right eye poses.
Always coincides with the pose of the right eye.
Always coincides with the pose of the left active input device.
Always coincides with the pose of the right active input device.
Coincides with the pose of the left input device if it is detached.
Coincides with the pose of the left input device if it is detached.
Coincides with the pose of the left controller when it is in a hand.
Coincides with the pose of the left hand when it is on a controller.
Coincides with the pose of the right controller when it is in a hand.
Coincides with the pose of the right hand when it is on a controller.
Anchors controller pose to fix offset issues for the left hand.
Anchors controller pose to fix offset issues for the right hand.
Always coincides with the pose of the sensor.

Events

Occurs when the eye pose anchors have been set.
Occurs when the trackingSpace's transform changes.
This event provides a single argument: the Transform of the tracking space. This is the same as the trackingSpace property.

Fields

If true, separate cameras will be used for the left and right eyes.
If true, all tracked anchors are updated in FixedUpdate instead of Update to favor physics fidelity.
: 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.
If true, the cameras on the eyeAnchors will be disabled.
: 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.

Protected Fields

bool _skipUpdate[Get]
readonly string trackingSpaceName[Get]
readonly string trackerAnchorName[Get]
readonly string leftEyeAnchorName[Get]
readonly string centerEyeAnchorName[Get]
readonly string rightEyeAnchorName[Get]
readonly string leftHandAnchorName[Get]
readonly string rightHandAnchorName[Get]
readonly string leftControllerAnchorName[Get]
readonly string rightControllerAnchorName[Get]
readonly string leftHandAnchorDetachedName[Get]
readonly string rightHandAnchorDetachedName[Get]
readonly string leftControllerInHandAnchorName[Get]
readonly string leftHandOnControllerAnchorName[Get]
readonly string rightControllerInHandAnchorName[Get]
readonly string rightHandOnControllerAnchorName[Get]
Camera _centerEyeCamera[Get]
Camera _leftEyeCamera[Get]
Camera _rightEyeCamera[Get]
Matrix4x4 _previousTrackingSpaceTransform[Get]

Protected 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 ( )
Checks for changes to trackingSpace's transform and, if it has changed, raises the TrackingSpaceChanged event.
This method compares the trackingSpace transform's localToWorldMatrix matrix against its value during the last invocation of this method.If trackingSpace is null, this method has no effect.
virtual void RaiseUpdatedAnchorsEvent ( )
virtual Transform ConfigureAnchor
( Transform root,
string name )
void CheckForAnchorsInParent ( )

Member Functions

virtual void EnsureGameObjectIntegrity ( )
virtual Matrix4x4 ComputeTrackReferenceMatrix ( )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon