Version: 2022.3
LanguageEnglish
  • C#
Method group is Obsolete

Camera.SetStereoProjectionMatrices

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
Obsolete Camera.SetStereoProjectionMatrices has been deprecated. Use SetStereoProjectionMatrix(StereoscopicEye eye) instead.

Declaration

public void SetStereoProjectionMatrices(Matrix4x4 leftMatrix, Matrix4x4 rightMatrix);

Parameters

leftMatrix Projection matrix for the stereoscopic left eye.
rightMatrix Projection matrix for the stereoscopic right eye.

Description

Sets custom projection matrices for both the left and right stereoscopic eyes.

In general it is recommended to stick with the projection matrices provided by the VR SDK to ensure accurate stereoscopic rendering. However for some specific scenarios it can be useful to override the projection matrices to achieve specific effects. For example, custom projection matrices would be required to implement binoculars in VR.

Calling Camera.ResetStereoProjectionMatrices will revert the camera to using projection matrices provided by the VR SDK.