unity rotate vector around point code example
Example 1: unity rotate around point
transform.RotateAround(point, axis, degrees);
Example 2: unity rotate vector around point
Vector3 rotated = Quaternion.AngleAxis(-45, Vector3.up) * vector;
transform.RotateAround(point, axis, degrees);
Vector3 rotated = Quaternion.AngleAxis(-45, Vector3.up) * vector;