1.向量转换为四元数
Quaternion qua0=new Quaternion(); Debug.Log(qua0.eulerAngles);//输出:(0.0, 0.0, 0.0) Quaternion qua1=Quaternion.LookRotation(Vector3.forward); Debug.Log(qua1.eulerAngles);//输出:(0.0, 0.0, 0.0) Quaternion qua2=Quaternion.LookRotation(new Vector3(1,0,0)); Debug.Log(qua2.eulerAngles);//输出: (0.0, 90.0, 0.0)