Hello, there I'm having a bit of trouble . I used code that I found on Unity Tutorial, about rotating around a pivot point, from point A to point B. I understand the basic concept of Rotation. Code (CSharp): int angle = (int)pivot.transform.eulerAngles.z; void Start(){ pivot.transform.Rotate(0.0f, 0.0f, Random.Range(-70.0f,70.0f)); //Sets starting point Random between -70 and 70 degrees } void Update(){ int angle = (int)pivot.transform.eulerAngles.z; if (angle > 80 || angle < -80) angle -= 360; if ((angle <= -80) || (angle >= 80)) direction *= -1f; // reverse direction of radar pivot.transform.Rotate (0, speed * direction * Time.deltaTime); } https://ibb.co/k4pzLm What I want is for red laser to rotate from Current position 0 to 90, and then from 90 back to -90 etc.Like a radar would do. This code manages to do that but gets stuck sometimes at 81f. Is there a better way to do this? And I noticed angle in Editor is shown like from 0 to 90 and from 0 to -90. While in play mode it's from 0 to 90 and when I want it to go back it's from 0 to 270.Does that affect it? I'm making some basic mobile game, so any help or tip would be appreciated. Thanks