Unity中有相应的api,单纯只是学习一下原理
Quaternion ToQuaternion(Vector3 v)
{
Quaternion q = new Quaternion();
float yaw = v.z * 0.5f * Mathf.Deg2Rad;
float pitch = v.y * 0.5f * Mathf.Deg2Rad;
float roll = v.x * 0.5f * Mathf.Deg2Rad;
float cy = Mathf.Cos(yaw);
float sy = Mathf.S