Rotating Bone
Automatically rotates bones whos names start with "Wheel"
Category: Layers
Published: Dec 23 2020, 16:40
Last Edited: Dec 23 2020, 16:40
Created for Moho Version: 12.0
Returned Version: 0
Edition Downloads: 997

This is a layerScript that needs to be embedded into a bone layer. It finds all bones whos name starts with "Wheel", e.g. "Wheel 1", "Wheel 2" etc., and rotates them to match their length and their parent's translation along the X axis.
How to use:
1. Create a bone, place it at the center of the wheel, and make its length the same as the wheel's radius.

2. Name the bone starting with "Wheel". You can create as many wheel bones as you want, but they all should be children of the same parent bone. The name of the parent bone doesn't matter.

3. In the bone layer's properties, select the "Embedded script file" option. Select the script file.
