If you want to get rotations without jumps from one angle to another, don’t directly set euler angles, but use quaternions. See Transform.rotation property and Quaternion.euler method.

In addition, in order to get smooth transition from a rotation to another, you’ll have to lerp it over time. You could use a tweening library ( HotTween, GoTween, etc. ). Or do it yourself using Mathf.Lerp or in your case Quaternion.Lerp, with a timer you increment by Time.deltaTime in the Update method.