Godot Engine

Godot Engine

43 ratings
[Beginner] Creating a Real Clock in Godot Engine
By Ivan
We are creating a clock from start to finish that will display your local time. A good place to start if you wish to get more familiar with Godot Engine and GDScript.
2
   
Award
Favorite
Favorited
Unfavorite
[Optional] A Follow-up Math Explanation
In this follow-up video I explain how I calculated the clock's pointer angle.
After editing my last video (https://youtu.be/6Wvhp4o8Wps), I realized that I did not do a good enough job explaining the math behind it. Hopefully, this will make it more understandable. :)

7 Comments
EDP LeakingCrack 4 Jan, 2024 @ 9:44pm 
i made it to where the sky changes depending on your time (in real time)
DarkChum 5 May, 2022 @ 7:34pm 
@Kilravok I imagine you would just have to modify the scripts for each clock.
Kilravok 15 Sep, 2021 @ 4:30am 
I had done the math a bit different, since I didn't know how to calculate a rotation with Pie. I know, there are 360 degrees in a circle and 60 seconds in a minute. To get the degrees per second, I just divide the total circle by the number of sections (360/60), which equals 6. For the hour hand, I divide the 360 of the full circle by the 12 sections of the hour, which equals 30.

Knowing the Pie calculation is still valuable and I am glad you showed us this, since one might occasionally want a clock with different sectioning that 360 is not easily divisible into, for example if one creates a 13 hour clock (like in the movie Labyrinth)
Kilravok 15 Sep, 2021 @ 4:20am 
Is it possible to modify each instance of the clock, when you have several of it ion a scene? Like, having 24 clocks arranged along a world map each with a 1-hour difference for the time zones? Or would I have to create new clocks for each instance?
Ulvi YELEN 27 Apr, 2019 @ 11:41pm 
wow cool
Ivan  [author] 13 Dec, 2016 @ 2:54pm 
Glad i could help! :)
Art Monkey 12 Dec, 2016 @ 5:38am 
This was helpful. Thankyou.