A really noob question about Time.deltaTime.

Hi!

I tried to make a simple Sun rotation. It is just position to (0,0,0), and I want to rotate it 360°/minute.
It sounds simple, isn’t it?
Ok, so this is a directional light (“The Sun”), My SunControl script contains: transform.Rotate(Vector3(Time.deltaTime*5,0,0));
Just a simple rotation, this has to rotate my “The Sun” game object 360°/minute.
It doesn’t work! It rotates it about 360°/72 seconds! :shock:
Simply using transform.Rotate(Vector3(Time.deltaTime,0,0)); works, the X-axis rotation and the timer is in fully sync. It rotates “The Sun” in 5 minutes, which is OK, it’s exact.

What is the problem?

Well, you’re telling it to, so it’s working exactly as expected. 360/5 = 72. But 360/6 = 60, so use 6 instead.

–Eric

OMG, I don’t know, how I made that ridiculous mistake.
When I told this to my friend, and I typed him the code, I got it at that moment. Of course it is good, I was counting with 360/5 which is really 72 second.
OK, OK, sorry for that really noob question.
I was just inattentive…