Unity Camera Orthographic Size
来源:互联网 发布:淘宝携程 编辑:程序博客网 时间:2024/06/18 11:23
关于 Camera的Orthographic 中的size大小问题,默认为5 units,(5个单位)。
首先5是什么意思呢?
That magic number is the number of units from the center half of the screen to the top, or bottom.
也就是 5x2 = 10,说明你的窗口的高为10个units.这样就好理解了。
怎么样与Unity的像素想关联呢?
如果我们把一张图片转换为 Sprite(2D and UI),你会看到 Pixels Per Unit 100,默认位100个pixels 为1个 Units。
如果我们把图片100改为128。我们用一张128x128像素的图来测试。
这样,我们在默认的 Orthographic下的Size为5,也就是高为10个单位,如果1一个单位为128像素的话,用10张像素为128的,就可以填满整个屏幕的高了。
What this will do is convert 1 pixel from that sprite into 1 Unity3D Unit. This means if your sprite is 50px in height, in world space it is now 50 units in height. We need to fix this and we’re going to do this with the Orthographic Size in the Camera。
当然,如果你想要和像素点相互对应,那么比如,如果你在1920X1080下做,你可以把 Orthographic下的Size 设置为 1080 / 2 = 540.
并且把图片的 pixels per units 设置为 1 。这样,你的像素单位就对应了。 ps: 怎么感觉用英文描述比较清晰呢?难怪我语文不及格!
- Unity Camera Orthographic Size
- Unity(四) Orthographic Camera正交相机的Size
- Orthographic camera-正交摄像头
- Camera Perspective/orthographic
- {Unity} Unity2D camera size和分辨率
- Camera类之orthographic-摄像机投影模式
- Unity 3D 正交(Orthographic)摄像机尺寸学习笔记
- Unity 3D 正交(Orthographic)摄像机尺寸学习笔记
- unity perspective透视摄像机和orthographic正交摄像机解析
- Unity - Camera
- android-Camera.Size
- Orthographic Projection
- Camera Shake in Unity
- Unity中的Camera
- UNITY 5.2 Camera类
- Unity的camera组件
- Unity camera.rect 用法
- unity Camera 属性详解
- 交互设计的三大隐形机制:加载、刷新和缓存
- python:解析XML文件后写入EXCEL(一)
- Bottom Sheets实现底部动作条
- Apple Pay强势来袭,开发者应做的事情
- 携程2016研发工程师笔试题
- Unity Camera Orthographic Size
- android 硬件加速后webview闪烁问题
- CodeForces 628A Tennis Tournament
- caffe 使用笔记
- expdp 数据泵导出排除多个表
- 有return的情况下try catch finally的执行顺序(最有说服力的总结)
- mycncart后台如何新增页面
- Git的使用
- 判断安卓设备是否连接网络