I have written a full tutorial in how you can create a clock that shows your local time using Godot Engine. If you prefer written tutorials, you can find one here. You can find the video tutorial below.

If you have any questions regarding this tutorial - perhaps there is something you did not understand, or got general feedback - please comment them below and I will will do my best to answer them. :)

Video

A follow-up video has been made in order to explain the math better. In the main video, I did not do a good job explaining how it came to be that PI/30 multiplied with current seconds and minutes would result into the angle in radian.

Video

You have to think about real world mechanics + trigonometry.

The seconds pointer travels 60 ticks in one go around, because it counts 60 seconds. The same thing for the minutes pointer, which counts 60 minutes.

So for both of them, for each lap or 2pi(360°) we have 60ticks, therefore we have 1/30 pi per ticks(minutes/seconds).

Now the hour clock travels in 12 large chucks, since it counts 12 hours in the whole go around(360°). So for that, it has 2pi for the whole 12 sections, or simply 1/6 pi per hour.

Visual example:

2π.....60 (min or s)
  X.....1 (min or s)
X= 1/30 π/(min or s)
2π.....12h
 Y......1h
Y=1/6 π/h

That's the math I know. :smile:

@Kiori said: You have to think about real world mechanics + trigonometry.

The seconds pointer travels 60 ticks in one go around, because it counts 60 seconds. The same thing for the minutes pointer, which counts 60 minutes.

So for both of them, for each lap or 2pi(360°) we have 60ticks, therefore we have 1/30 pi per ticks(minutes/seconds).

Now the hour clock travels in 12 large chucks, since it counts 12 hours in the whole go around(360°). So for that, it has 2pi for the whole 12 sections, or simply 1/6 pi per hour.

Visual example:

2π.....60 (min or s)
  X.....1 (min or s)
X= 1/30 π/(min or s)
2π.....12h
 Y......1h
Y=1/6 π/h

That's the math I know. :smile:

Exactly. However if you do not understand basic math (i.e. division on both sides / manipulating math equations), you probably wont understand. At the very least, I hope it is intuitive enough in my 3 minute explanation of it. :)