API ReferenceGE Extensionsflowgraphnodesmathvector
Split (Flowgraph Node)
- **Node Name:** `Split`
Overview
- Node Name:
Split - Category:
simple - File:
extensions/flowgraph/nodes/math/vector/split.lua
Splits a vector, color, or quaternion into its individual numeric components (max size 4).
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
value | vec3 / color / quat | A vector, color, or quaternion to split |
Output Pins
| Pin | Type | Description |
|---|---|---|
x | number | First element |
y | number | Second element |
z | number | Third element |
w | number | Fourth element |
How It Works
- The input value is treated as an indexed table.
- Each element is extracted by index:
table[1]→ x,table[2]→ y,table[3]→ z,table[4]→ w. - If the input is nil, all outputs are nil.
- For vec3 inputs,
wwill be nil. For quat inputs, all four outputs are populated.
This is the counterpart to the Merge node.
Lua Example
-- Extract height from a position:
-- value = vehicle position (vec3)
-- z output → height value for altitude check
-- Extract quaternion components:
-- value = vehicle rotation (quat)
-- x, y, z, w → individual quaternion componentsKey Dependencies
_flowgraph_createNode()- standard flowgraph node registration
Additional Methods
C:init()
Initializes the node, setting up pins and default properties.
C:work()
Main work function called each frame/tick when the node is active.
See Also
- Merge (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide