-
Notifications
You must be signed in to change notification settings - Fork 7
Controls
To make a control with CCL, right click your control object, and find CCL > Add Control in the context menu.
In the window that opens, fill out the fields and the basic setup of your control will be created.
Important
All of the steps here can be done manually.
A lever is anything that turns on an axis. Most controls will be of this type.
Output is a range between 0 and 1. If notched, it will only change its output on notch change (5 notches will only output 0, 0.25, 0.5, 0.75, and 1). If not, the range is continuous, with a 1° resolution for value change.
A button is a linear control that can be pressed from a direction. It can be a toggle or single use. It can only output 0 or 1.
A rotary is a small object designed to be rotated from the pivot, instead of an handle like a lever. Otherwise, it works the same way.
A puller is a control that can be moved linearly along an axis. If not notched, it will be springloaded.
Note
Pullers require a different setup from other controls, which is explained at the bottom of the page.
A toggle switch is like a button, but it rotates instead of moving linearly.
A wheel is a rotating control designed for fine movement. It should be used for objects without rotation limit or high limits.
A pullable rope is a custom CCL control that can be used for elastic ropes. Ropes are affected by gravity and will always return to the neutral value if not used.
This is used to define the overall region of the control, for easier mouse interaction. This means it should cover the area the control uses in most/all states it can be, or be an extended area for very small controls to be easily interacted with.
Note
This should not be used with very large controls like doors and windows.
By default, a control is assigned to a port. Fuses are not ports, so they require a separate component. The handbrake is also separate from this system, as it works with vehicles without simulation (most unpowered wagons). You can combine these components to feed multiple things at the same time, even of the same type.
Due to the way controls work, it is convenient to have the control positioned at the local origin. This option will automatically adjust your object to fit an easy to use structure, without changing any position/rotation of your model. It should be enabled most of the time.
After setting up your control object, you can right click it in the hierarchy and find CCL > Setup Control Controls in the context menu. This will open a second wizard which can set up the keybinds for specific controls automatically.
Pullers require a more strict setup to work.
- The object with the puller script should be parented to a pivot with its
Yaxis aligned with the movement direction. - The control should have an anchor object as its sibling, aligned with that same axis.
- These 2 objects are then linked in the puller.