transform.rotation = Quaternion.Euler(new Vector3(45,a++,0));
设置transform的旋转量为绕x轴旋转45度,y轴旋转量累加(y轴这时仍是世界坐标的旋转轴)
transform.rotation = Quaternion.Euler(new Vector3(45,0,0)) * Quaternion.Euler(new Vector3(0,a++,0));
同样为设置旋转量,但是此句是在x轴旋转45度后再对物体按照其自身的y轴旋转量累加(y轴这时为物体自身的旋转轴)
两者效果不一致
转载于:https://www.cnblogs.com/yuji/archive/2012/12/28/2836954.html