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.
The textures work just like they would for any normal prop.
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:
- Part 0 - G=0
- Part 1 - G=64
- Part 2 - G=128
- Part 3 - G=192
The LOD can't rotate, it's static just like any regular prop LOD.
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.
Around which axis the rotation happens. Off-axis rotation is not possible.
The center of the rotation.
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:
- 12 hour arm = 2
- minute arm = 24
- second arm = 1440