Was scratching my head over why an object was twitching every second or so and isolated the problem to the use of deltaTime.
rotatingObject.transform.localRotation = Quaternion.AngleAxis(10 * Time.deltaTime, Vector3.back);
Debug.Log(rotatingObject.transform.localRotation.z);
This is a dumbed down version of the code I’m using - I’ve disabled everything else for the sake of troubleshooting. If I remove Time.deltaTime, the log shows a perfectly consistent rotation angle, but when I include it, the log shows a very minor but constant fluctuation in rotation with occasional jumps to a seemingly random value.
I’m aware that Time.deltaTime is supposed to even out movements between frames, but I can’t see why it would cause micro movements in an unmoving object, nor why it would cause the object to freak out. smoothDeltaTime hasn’t worked either - am I missing something?