Creating a Real Clock in Godot Engine

  Рет қаралды 9,221

Ivan Skodje

Ivan Skodje

Күн бұрын

Пікірлер: 15
@IShadyl
@IShadyl 2 жыл бұрын
I love when squirrels teach us humans stuff. Those brilliant rodents!
@wildrimak
@wildrimak 5 жыл бұрын
In godot 3: radian_seconds = OS.get_time()["second"] * (PI/30) radian_minutes = OS.get_time()["minute"] * (PI/30) + radian_seconds/60 radian_hours = OS.get_time()["hour"] * (PI/6) + radian_minutes/12 pivot_seconds.set_global_rotation(radian_seconds) pivot_minutes.set_global_rotation(radian_minutes) pivot_hours.set_global_rotation(radian_hours)
@jimmyslaughter6262
@jimmyslaughter6262 2 жыл бұрын
Thank you kindly
@TheRealKaiProton
@TheRealKaiProton 2 жыл бұрын
That was great, just what I needed for my current project,
@allochi
@allochi 8 жыл бұрын
Well done Ivan! I like your tutorials, Keep up the good work!
@PapaiGameMaker
@PapaiGameMaker 7 жыл бұрын
Using this maths to create a rotating menu!
@IvanSkodje
@IvanSkodje 7 жыл бұрын
I would highly recommend checking out Circular Container github.com/KOBUGE-Games/CircularContainer :D
@VictorGabriel-gc2df
@VictorGabriel-gc2df 3 жыл бұрын
You saved my life
@galacticquasar9944
@galacticquasar9944 4 жыл бұрын
Would yiu be able to make a video on how to make the game read the date? I need this as the climate of my 2d game will change with the seasons. Thank you.
@IvanSkodje
@IvanSkodje 4 жыл бұрын
The time & date from the computer? var date_time = OS.get_datetime() docs.godotengine.org/en/stable/classes/class_os.html#class-os-method-get-datetime Returns a dictionary which you can access, for example year: var year = date_time["year"] I do not remember if it returns a string or not, I am sure you can figure it out :)
@UnrealProjects
@UnrealProjects 3 жыл бұрын
Will this work for 3d model clock? I want to create a grandfather clock with chime sound, is it possible to add chime sound?
@IvanSkodje
@IvanSkodje 3 жыл бұрын
Everything is possible with Godot Engine! You could create a signal on the script that gets emitted when the clock hits 12 (every 1 hour), and then have a "sound player" (or whatever you are using) to connect on the script so it gets informed when to ring a chime sound. The logic will work if you use rotation on a 3D node, yes; however it is up to you to figure out the center (XyZ) and rotate in only two of the 3 directions. (You probably know more than me in 3D space) :)
@UnrealProjects
@UnrealProjects 3 жыл бұрын
@@IvanSkodje ...thanks, will study more..
@jorge28624
@jorge28624 8 жыл бұрын
I want to trust you, and I trust you, but... how did you come with the math for the time to radians?
@IvanSkodje
@IvanSkodje 8 жыл бұрын
Glad you asked! I have already recorded a video about that. Will post it tomorrow. :) Short version: 60 sec -> 360 degrees around the clock 360 degrees in radian is 2PI. 60 sec = 2PI 1 sec = 2PI/60 -> PI/30 Multiple PI/30 per current second to get the angle in radian. With Hours it is 12 instead of 60.
Using One scene instead of Ten, in Godot Engine
6:40
Ivan Skodje
Рет қаралды 21 М.
I Made a Multiplayer Space Game
8:41
Barji
Рет қаралды 195 М.
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 101 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 7 МЛН
The MOST IMPORTANT Shader Method | Godot Shader Beginners!
7:13
How To Make Dialogues In Godot 3
10:04
Nagi
Рет қаралды 7 М.
Day & Night Cycle in under 8 minutes! Godot 4.0 Tutorial
7:34
6 Tips to Better Organize your Godot Projects
11:39
GDQuest
Рет қаралды 136 М.
Playing Music after SFX is done playing | QA - Godot Engine
5:40
Ivan Skodje
Рет қаралды 2,5 М.
Introduction to signals in the Godot game engine
10:12
GDQuest
Рет қаралды 35 М.
What Canvas Size Should you use for Pixel Art? (Pixel Art Tutorial)
7:28
Learning C++ by making a Game... in 1 Week?!
10:14
Floky
Рет қаралды 576 М.
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 101 МЛН