# Transform.Rotate micro stutter?

Hey all I have a quick question.

I am new and obviously still learning the basics of programming/scripting. However I am confused by the result of a simple script.

The goal is to have a Start Menu with a 3d background.The camera is attached to an Empty Object, which has a script that is meant to constantly rotate.

My confusion, is whether I am live testing in Unity, or a built executable. When the empty object is rotating, it will have a pause or a few milliseconds, and then continue with its rotation. Almost like a planned micro stutter. Regardless of where it is in its cycle. How can I make the rotation as perfectly smooth as possible?

Below is the script for rotating the empty object that the camera is attached to.

public class cameraAnchor : MonoBehaviour {

public float speed = 5f;

// Update is called once per frame
void Update () {

//rotate camera anchor around y axis
transform.Rotate(Vector3.down, speed * Time.deltaTime);
}


}

• Have you tried toggling vertical sync on or off? – Chris McFarland Apr 21 '18 at 7:48
• You're already correcting the rotation speed for deltaTime, so from this code alone the rotation should be perfectly smooth. It's likely that your stutter is caused by something else entirely, like the garbage collector kicking in or a synchronous load / heavy script use bogging down the main thread. Is there any pattern to when you observe the stutter? Have you opened up the profiler to look for any spikes around that time? – DMGregory Apr 21 '18 at 9:20
• Thank you for the advice. DMGregory was correct. It was something else entirely. Turns out it wasnt even Unity. My power supply was failing, therefore not pushing enough power to function at proper speeds. Problem is fixed, Thank you both :) – theBrokenVerticie Apr 21 '18 at 9:44