Sprite rotation using system time?

Get help using Construct 2

Post » Sun Dec 23, 2012 4:01 am

I have a question

I need to rotate a sprite 360 degr synced to the system time.
But i want to move it according to milliseconds.
So the sprite will move smoothly and takes 24 hours to rotate "Realtime".

I tried some things with the system date and time plugin, but i have not been able to figure it out.
Allready searched through the forum, but cant find anything this specific.

Any pointer?
Would be great.

Kind Regards.
Savvy001Savvy0012012-12-23 04:03:20
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Sun Dec 23, 2012 7:08 am

Sprite: Set angle to self.Angle + dt*360/(24*60*60)
should rotate the sprite a 360 per 24hours
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Dec 23, 2012 7:20 am

Thanx @Yann but i think that dt would not be enough to set it in sync with the system time.
I could be wrong about that, so please correct me if so, then i could learn.

I kept trying the past few hours and i finaly figured it out.
Check the screen if u like.



Thanx for the help!
B
56
S
20
G
13
Posts: 778
Reputation: 13,204


Return to How do I....?

Who is online

Users browsing this forum: h1k3 and 18 guests