Cover by Matt Smith, Chico Queiroz

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Displaying an analogue clock

Analogue clocks are often more visually appealing, and often worth the little extra effort in creating the GUI elements for the clock-face and hands.

Displaying an analogue clock

How to do it...

To display an analogue clock, please follow these steps:

  1. Create a new scene, and add a Directional light in the direction of the camera.
  2. Create the clock face, this is a Cylinder with the following properties:
    • Position (0, 0, 3)
    • Rotation (90, 0, 0)
    • Scale (13, 0.1, 13)
  3. Create three differently colored or textured materials (for example, red, green, and blue), to be applied to the hands of the clock. Name these materials as m_seconds, m_minutes, and m_hours.
  4. Create ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required