new vector 3 based on rotation code example Example: unity rotate vector Vector3 rotated = Quaternion.AngleAxis(-45, Vector3.up) * vector;