Unity中繞任意軸任意角度旋轉向量

遊戲中有一需求,就是一個矩形或者Cube繞着某一點旋轉任意角度,如今給出下面算法。算法 public static Vector3 RotateRound(Vector3 position, Vector3 center, Vector3 axis, float angle) { Vector3 point = Quaternion.AngleAxis(angle, axi
相關文章
相關標籤/搜索