/// <summary> /// Rotate the specified point around another point. /// </summary> public static void RotatePointAroundAnother(this Vector2 point, Vector2 centerPoint, float angle) { Vector3 euler = Vector3.zero; euler.z = angle; point = MyUtilities.RotatePointAroundPivot(point, centerPoint, euler); }
/// <summary> /// Rotate the specified point around a pivot. /// </summary> public static void RotateAroundPivot(this Vector3 point, Vector3 pivot, Quaternion angle) { point = MyUtilities.RotatePointAroundPivot(point, pivot, angle); }
/// <summary> /// Rotate the specified point around a pivot. /// </summary> public static void RotateAroundPivot(this Vector3 point, Vector3 pivot, Vector3 euler) { point = MyUtilities.RotatePointAroundPivot(point, pivot, euler); }
/// <summary> /// Rotate the specified object around a pivot. /// </summary> public static void RotateAroundPivot(this Transform transform, Vector3 pivot, Quaternion angle) { transform.position = MyUtilities.RotatePointAroundPivot(transform.position, pivot, angle); }
/// <summary> /// Rotate the specified object around a pivot. /// </summary> public static void RotateAroundPivot(this Transform transform, Vector3 pivot, Vector3 euler) { transform.position = MyUtilities.RotatePointAroundPivot(transform.position, pivot, euler); }