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