unity中的坐标系

世界坐标 - transform.position

  物体在世界坐标系的坐标,如果父物体坐标是10,10,10,默认子物体也是10,10,10

本地坐标 - transform.localPosition

  物体相对于父物体的坐标,默认是0,0,0

屏幕坐标系 - Cemara.main.worldToScreen

  和分辨率有关,左下角是0,0,右上角是screenwith,screenheight

视图坐标系 - Cemara.main.worldToViewport

  从00 - 1,1

 

posted @ 2019-06-03 12:24  gamefan  阅读(805)  评论(0编辑  收藏  举报