|Name of gadget||Splitter|
|Section||Logic & Processing|
|Number of Tweak pages||1|
|Last updated||7 April 2020 [v2.09]|
This gadget will split a fat wire into smaller wires with separate signals on separate output ports. A fat wire is a small collection of (usually related) values that are transmitted along the same wire – it is used to help keep logic tidy, and is represented as a number of wires twisted together. For example a colour output (a fat wire of three signals) put through a splitter will divide into separate R , G and B output values (red, green and blue). A controller sensor left stick output will split into up/down and left/right.
Example Tutorial (adapted from Media Molecule)
- Place a tag
- Place a splitter
- Connect scene space transform on the tag to the input on the splitter.
- Now the splitter had divided into 3 output ports – translation, rotation and scale.
- The translation port has a fat wire, so we can divide this again. Add another splitter (splitter 2).
- Connect the translation output to the splitter 2. This shows 3 different output ports.
- Add 3 text displayers and connect the number value outputs of splitter 2 to the number/range inputs of the text displayers.
- Tweak the decimal places all the way up and hit start time to see the numbers. Try moving the tag around!
[image from v2.07; same in v2.09]
- Splitter Input / Fat Wire Type
Connect the wire you want to split into 1a. A signal corresponding to the fat wire type is output from 1b. The output value is an index number from 1 to 24, representing each of the possible fat wire types but it is probably mostly useful as a visual representation of the type, for the creator to see while wiring logic up. Outputs are as follows:
- 1 – Boolean
- 2 – Number
- 3 – Colour
- 4 – Transform
- 5 – Signal
- 6 – 4 Numbers
- 7 – 3 Numbers
- 8 – 2 Numbers
- 15 – Spice and Randomisation
- 17 – Rotation
- 18 – 8 Numbers
- 20 – Collision
- 21 – Left/Right Stick
- 22 – Music
- 24 – Player Info
Here there are up to 8 outputs depending on the type of input wire. Even a simple number or signal wire will generally be split into positive and negative components (which is sometimes useful in itself, allowing a quick and easy way to drive logic based on the sign of the input, or to output only the magnitude of the signal, ignoring its sign).
- Rotation Output Type
This option is specific to the “Rotation” fat wire type. It allows you to split out the rotation information in two different ways. In this way, a combiner and splitter together could be used to convert between the two rotation definitions.
- Yaw, Pitch, and Roll
Rotation will be entered as three angles: yaw, pitch and roll.
- Axis & Angle
Rotation will be specified by defining an axis and the angle around that axis: inputs X, Y and Z.
- Yaw, Pitch, and Roll
This is where you turn the gadget on/off
As well as separating the signals from fat wires, the Splitter’s ability to take any input wire and tell you (via the Fat Wire Type) what type of signal that wire is carrying can be invaluable when debugging your logic.
v2.03: “Rotation output type” added, allowing the user to choose between two completely different formats for outputting the rotation angle. Fat Wire Output indices updated to new values.