rotate vector around axis unity code example
Example 1: unity rotate vector
Vector3 rotated = Quaternion.AngleAxis(-45, Vector3.up) * vector;
Example 2: rotation around own axis in unity
transform.RotateAround(transform.position, transform.up, Time.deltaTime * 90f);
Example 3: unity rotate around axis
transform.Rotate(axis, degrees);