Please Help ME

Need help About Perspective Clock

Hello,

Dear Seniors

Although I am very New to DesktopX but I want to know that how to make an Prespective "Analog  Clock" ? an image is enclosed to see what actually I want to ask,

Please help

Thanks

Preview

5,453 views 3 replies
Reply #1 Top

I don't know how you would go about doing that. The perspective clock face, yeah, but getting the hands to rotate the correct degrees and maintain that perspective look? I don't know if that's possible. Of course, you could always make a ton of images for each clock hand position, and just have the object flip through those, but that'd be a pain.

Reply #2 Top

is there any example ? to do this ?

Reply #3 Top

Not that I know of. Off the top of my head, you'd have to make your images first. 12 for each hour, 59 for each minute, 59 for each second (130 images!)


Then you'd have to create your three clock hand objects and add states for each image (130 states in total), naming the states after the time they represent (12, 1, 2, 3...etc.) So the second hand object would have states 0 through 59, the hour 1 through 12, etc. SEE THIS TUTORIAL TO GET THE IDEA

Last, you'd need a script to get the time and set the appropriate state.

A quick example:

'Called when the script is executed
Sub Object_OnScriptEnter
 Object.SetTimer 1, 1000
End Sub

'Called when the script is terminated
Sub Object_OnTimer1
 t = second(now)
 object.state = t
End Sub

 

The minute and hour functions should work the same way.

WC WIKI - DX USER GUIDE - MORE TUTORIALS