1、世界坐标系
原点:世界的中心点
轴向:世界坐标系的三个轴向是固定的
this.transform.position;
this.transform.rotation;(四元数)
this.transform.eulerAngles;(欧拉角)
this.transform.lossyScale;
2、物体坐标系
原点:物体的中心点(建模时决定)
轴向:右方——x轴正方向;上方——y轴正方向;前方——z轴正方向
// 相对父对象的物体坐标系的位置,本地坐标,相对坐标
this.transform.localPosition
this.transform.localEulerAngles
this.transform.localRotation
this.transform.localScale
// 相对父对象物体坐标系的变化
3、屏幕坐标系
原点:屏幕左下角
轴向:右——x轴正方向;上——y轴正方向
最大宽高:Screen.width;Screen.height
Input.mousePosition
Screen.width
Screen.height
4、视口坐标系
原点:屏幕左下角
轴向:右——x轴正方向;上——y轴正方向
特点:左下角为(0,0);右上角为(1,1)
和屏幕坐标类似,将坐标单位化(将像素的宽高