I’m using this code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpinObject : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update ()
{
StartCoroutine(ContinuousRotation());
}
IEnumerator ContinuousRotation()
{
while (true)
{
transform.Rotate(Vector3.forward, 10);
yield return new WaitForSeconds(5f);
}
}
}
It’s rotating the object but the problem is no matter what time i’m setting when running the game the rotating speed is the same.
I tried: yield return new WaitForSeconds(1f); then 5f in the original it was 0.01f but the speed never change.
Second problem is that the rotating making the object some flickering not flickering but some interruption to the eyes it’s not really rotating smooth. Maybe the problem is the speed ?