Prop Rotating Shader

About

The PropRotating shader can be used to create props which have rotating parts or clocks.

This article assumes you are familiar with regular prop asset creation.

Textures

The textures work just like they would for any normal prop.

Mesh

Vertex Paint

Single Rotating Part

If you are using the script for a single rotating part, the rotating part should be vertex painted black and the rest should be vertex painted white.

Multiple Rotating Parts or Clocks

If you are using the script for multiple rotating parts, you can have up to 4 different rotating parts.

For rotating parts - the vertex color blue channel must be 0.

Each rotating part can have its own parameters, and which parameters will be used is controlled by the vertex color green channel:

LOD

The LOD can't rotate, it's static just like any regular prop LOD.

Scripts

The script for a single rotating part can be found here , and the script for multiple rotating parts or clocks can be found here .

Keep in mind that when dealing with XYZ coordinates - the Y coordinate ingame represents height.

Axis

Around which axis the rotation happens. Off-axis rotation is not possible.

Pivot

The center of the rotation.

Speed

How many times per minute the rotation happens. Negative values reverse the rotation direction.

Speed for Clocks

When the clock parameter is set to 1, the speed defines how many times per day the part will rotate.

Speeds for usual clock arms: