unity rotate around and stop at an angle code example
Example 1: unity rotate around axis
transform.Rotate(axis, degrees);
Example 2: unity rotate quaternion around axis
RoatationVar = Quaternion.Euler(Vector3.up) * camera.rotation;
transform.Rotate(axis, degrees);
RoatationVar = Quaternion.Euler(Vector3.up) * camera.rotation;