Download

Clock synch to the computer clock?

Hi all,

I am clearly out of my depth here, but as I am working on a realistic simulation (kind of like archiviz) I was, thinking : would it not be great to have a clock (analogue in my case) sync to the computer clock, so that it does show the real time?

Has anybody already done something like that and can offer input/advice?

Thanks

Thomas

It shouldn’t be too hard using Rama’s Get Current Operating System Time blueprint node.

A digital clock would be fairly simple, but an analogue like in your case will need some more work to get the clock arms in place but since from what I see the BP gives you the seconds/minutes and hours as different variables it shouldn’t be too hard to make. I don’t have access to UE4 at the moment but when I have I will try to do it.

I have a similar need for something like this so I did some experimenting. I found some actions by typing “time” into the search menu. There are lots of options for capturing system time from Year to Day to Am or PM. What you want is UTC Now time. Once that’s placed pull from the return value and under Utilities>Text select one of the 3 options. The As Time node outputs a string so you can convert that to localized text and output to your hud.

Thanks, that’s great tips. But as I want to link it to a analog clock, it’s going to me more complicated than I thought…

I got it to work however there is a little problem with the “hours arm”

As you can see it’s displaying the system time correctly (red = seconds, orange = minutes, green = hours)

and this is the BP for it

But it needs some more work because for example at 13:30 the hours arm will be staying on exactly 13 (the others will be in place) so basically the hours arm moves only when the hours change on the system (this can be fixed by changing the rotation for hours from “System Hours * 30” to something that includes both the system hours and minutes)

wow nice, well done. Many thanks :slight_smile:

Thanks for this Enjobg! I’ve taken it a step further for anyone interested so that the hour and minute hands update per second:

Is there something wrong with this blueprint. Because Minutes hand and Seconds Hand are rotating together.