Version: Unity 6.2 (6000.2)
LanguageEnglish
  • C#

Camera.SetStereoProjectionMatrix

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

Declaration

public void SetStereoProjectionMatrix(Camera.StereoscopicEye eye, Matrix4x4 matrix);

Parameters

Parameter Description
eye Specifies the stereoscopic eye whose projection matrix needs to be set.
matrix The matrix to be set.

Description

Sets a custom projection matrix for a specific stereoscopic eye.

In general, you should use the projection matrices provided by the XRDisplaySubsystem for accurate stereoscopic rendering. However, when needed for specific scenarios, you can override the projection matrices to achieve specific effects. For example, you would need to set custom projection and view matrices to implement binoculars in VR.

Call Camera.ResetStereoProjectionMatrices to revert the camera back to using the projection matrices provided by the XRDisplaySubsystem .