In this tutorial, I am going to show you how to rig a ticking clock in 3ds max using Script Controller. Rigging a ticking clock seems quite difficult task at first but we can easily rig it by making use of simple math. We will be using the same expression for all the three clock hands with little modification. Here is the preview of what we are going to create.

Let’s get started.

### Step1

Here, I have basic clock geometry with Second, Minute and Hour hands. Let’s select the Second hand, go to Motion panel and select the **Y Rotation** from the Rotation track.

### Step2

Now, click on the assign controller button and select **Float Script** from the **Assign Float Controller** list. It will bring up the **Script Controller** dialog.

### Step 3

Before getting into the expression, we have to calculate the degrees that Second hand cover in a single tick or in a second.

Second hand moves **60** times to cover the **360** degrees of rotation.

So, the degree covered in single tick:

**360/60 = 6 degrees**

Now, in expression field write down,

**S*degtorad(6) **

Where **S** is seconds and **degtorad** function is to convert degrees to radians as 3ds max understands radians.

Click on **Evaluate** button to evaluate the expression.

We can notice that it’s working fine but not ticking as an actual clock. Let’s fix this in the next step.

### Step 4

Modify the expression as:

**ceil(S)*degtorad(6)**

**Ceil** function lets the Second hand of the clock jumps directly to the next sixth degree like **6**, **12**, **18** and so on. Evaluate the expression again to save the changes and close the **Script Controller** dialog.

### Step 5

We are done with Second hand of the clock. For the Minute hand; we will be using the same expression with little modification.

Let’s select the Minute hand, go to Motion panel, select the **Y Rotation** from the Rotation track and assign a **Float Script** controller to it.

Since, the Minute hand is **60** times slower than the Second hand of the clock, so the expression for the Minute hand should be:

**(S/60)*degtorad(6)**

Write down the given expression in the expression field of the script controller. Click on **Evaluate** button when you are done. Now, every time the Second hand will complete a circle or 60 seconds, the Minute hand will rotate 6 degrees.

### Step 6

We will use the similar logic to drive the Hour hand. Every time the Minute hand completes a circle, I want the Hour hand to rotate 30 degrees to start a new hour. As we know that the Minute hand takes 3600 seconds to complete a circle – so the expression for the Hour hand should be,

**(S/3600)*degtorad(30)**

Select the Hour hand and assign the **Float Script** controller to it and write down the given expression in the expression field of Script Controller dialog. Evaluate the expression and check how is it working. That’s it, we are done now. Now, we have an awesome and working ticking clock.

I hope you enjoyed this tutorial and learned something new from it. If you face any problem following this tutorial just email me or leave your comment in comments section.