在VR 中,如果镜片的中心轴,和屏幕的中心轴不在一条线上,

就会出现无论如何调节IPD,看到的图像都不清晰,这时候,要修改Camera的投影矩阵,

只需要一句代码就能搞定:

Camera.main.projectionMatrix *= Matrix4x4.Translate(new Vector3(1f,0,0));

注意 平移的单位目测是mm级的,这句代码的含义即将投影矩阵平移了1mm

 

变换前

Unity Camera中心点的偏移

 

变换后

Unity Camera中心点的偏移

 

相关文章:

  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
猜你喜欢
  • 2021-11-10
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2021-04-15
  • 2021-04-20
  • 2022-12-23
相关资源
相似解决方案