Gates ›
Math - Advanced ›
Blend
Blend
Blends from Input A to Input B: Blend 0 outputs A, 1 outputs B, and 0.5 is halfway. Supports integers, decimals, vectors, rotators, quaternions, and colors. Clamp Alpha prevents extrapolation; rotations follow the shortest path.
Diagram
Ports drawn from the source data: inputs left, outputs right, config inside.
How it's used
Interpolate between two values by an alpha (0..1). The one gate behind smooth motion, fades, and easing.
- Smoothly move a brick between two positions
- Fade a color or light intensity
- Ease any value toward a target
Smoothly open a door between two positions
// Blend alpha 0 -> closed, 1 -> open.
let pos = Blend(closedPos, openPos, alpha)
// Drive 'alpha' from a Timer or Tween for smooth motion. Blend is the same math as lerp. Clamp Alpha (config) keeps alpha within 0..1 so overshoot can’t push past the endpoints.
Technical details — ports, config & source
Wire inputs
Wires you feed into the gate.
| Display name | Type | Tooltip |
|---|---|---|
| Blend | float | The alpha value for blending between Input A and Input B. 0 means only Input A, 1 means only Input B. Anything between is a mixture of the two - for example, 0.5 would give you a value half way between A and B. |
| Input A (InputA) | float | No tooltip in source |
| Input B (InputB) | float | No tooltip in source |
Wire outputs
Wires the gate produces.
| Display name | Type | Tooltip |
|---|---|---|
| Output | float | No tooltip in source |
Configuration properties
Set on the gate itself in its properties panel — not wired. Distinct from inputs.
| Display name | Type | Tooltip |
|---|---|---|
| Clamp Alpha (bClampAlpha) | bool | No tooltip in source |
Source details
- Brick asset
- B_1x1_Gate_Expr_MathBlend
- Component class
- BrickComponentType_Expr_MathBlend
- Kind
- expr
- Family
- Math
- Half size
- 5 × 5 × 2