Unity中Camera size 和 unity中单位的关系

1.Unity中Create出的Plane默认为10米。
2.Unity中Create出的Cube默认长宽高均为1米。
3.正交相机的Size为1控制的是高 为2米.

如果想控制一个Cube铺满屏幕则计算如下:

  height = 2*Camera.main.orthographicSize;
  width = height*Camera.main.aspect;

iOS上:后置摄像头

 设置Orientation 为 Landscape Left ,
 WebCamTexture.videoRotationAngle =  0;

 WebCamTexture.videoVerticallyMirrored = true;

 设置Orientation为Portrait,
  WebCamTexture.videoRotationAngle =  90;

  WebCamTexture.videoVerticallyMirrored = true;

 设置Orientation为Landscapre Right,
 WebCamTexture.videoRotationAngle =  180;

 WebCamTexture.videoVerticallyMirrored = true;

设置为AutoRotation ,如果启动时设备平方,在启动后跟上述结果不一致,如果启动时设备非平方,则跟上面结果一致。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容