Jerdak is right. Update()
is called every frame, and not every second. That way, time
reaches 360 very fast. In order to get the elapsed time since last call to Update
, use Time.deltaTime
. Which basically means when you do transform.Rotate(Time.deltaTime * speed, 0, 0);
, it'll rotate according to your speed. So use a speed measure rather than a time measure.
the rotation starts slowly then increses its speed until (every 2 rounds) it returns to 0.
This is expected behaviour. Like I said, you used time
instead of speed
. You increase the speed (named: time
) every 0.2 seconds, thus increasing the rotation speed.
when i start the game, the object don't rotate
I am unsure why this happens but when you wait long enough, you'll see the rotation occuring anyway. It might be happening but very slowly.