https://docs.unity3d.com/Manual/9SliceSprites.html
u3d九宫格不需要ps切,在spriteeditor里编辑边距即可,使用spriterenderer或image组件添加选中slice或tiled即可.
https://docs.unity3d.com/Manual/CameraTricks.html
U3D摄像机技巧,U3D摄像机FOV为垂直方向角度:
https://www.cnblogs.com/mobilefishstudio/p/4634664.html
要Maya和UnityFOV一致,先保证两者的Aspect Ratio一致,然后再按照长宽比换算两者各自应该使用的FOV或者Angle of View。
例如按照下面的方式设置,即可实现两边完全一样
Unity中的设置:
- Field of View:45
- AspecRatio:4/3
Maya中的Camera设置:
- Angle of View:60
- AspecRatio:4/3
经过反复测试发现horizontalFov和verticalFov的关系并没有那么简单。
横纵FOV与长宽比的关系如下:
tan(hFOV/2) = tan(vFOV/2) * aspect
参考:http://forum.unity3d.com/threads/how-to-calculate-horizontal-field-of-view.16114/
针对我们的需求,horizontalFov为90°,verticalFov为60°,那么aspect应该是:
tan(hFOV/2) = tan(vFOV/2) * aspect
aspect = tan(hFOV/2) / tan(vFOV/2)
aspect = tan(90/2) / tan(60/2)
aspect = tan(45) / tan(30)
aspect = 1 / 0.57735 = 1.732
结论:当aspect为1.732的时候,摄像机的horizontalFov为90°,verticalFov为60°