文档

Unity Engine

Unity Engine

SetStereoProjectionMatrices(Matrix4x4, Matrix4x4)

Sets custom projection matrices for both the left and right stereoscopic eyes.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
警告
Deprecated. Camera.SetStereoProjectionMatrices has been deprecated. Use SetStereoProjectionMatrix(StereoscopicEye eye) instead.
public void SetStereoProjectionMatrices(Matrix4x4 leftMatrix, Matrix4x4 rightMatrix)

Parameters

leftMatrix

Projection matrix for the stereoscopic left eye.

rightMatrix

Projection matrix for the stereoscopic right eye.

Remarks

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.