AFM_Spline
Spline mesh components and a helper for laying meshes along a spline, used by the teleport arc and cable-like props.
What it gives you
- Meshes laid along a spline with tapering
- Animated extend and collapse
- Colour interpolation
Requires
Description
AFM_Spline draws continuous geometry along a curve. Its most visible use is the teleport arc, but
it works equally for cables, hoses and pointer beams.
BP_Helper_Spline manages a set of BPC_SplineMesh sections along a SplineComponent, with
independent start and end radii so the shape can taper, and ShowSplinePercent for animating the
curve extending towards a target.
Setup
- Enable
AFM_Spline. - Spawn or place a
BP_Helper_Spline. - Set Radius Start, Radius End and Material.
- Call
SetSplineLocationsto define the curve.
Usage
Animating an arc
Call SetExpand to extend or collapse over a duration, optionally destroying the actor afterwards.
Reacting to a target
Use ShowSplinePercent to reveal the curve progressively as it approaches a valid destination.
Key properties
| Property | When to change |
|---|---|
Radius Start / Radius End | Taper the shape |
Spline Color | Appearance; interpolate for state changes |
Interp Speed | How quickly colour and endpoint changes blend |
Extending
Derive from BPC_SplineMesh for custom section behaviour.
Performance notes
Each section is a spline mesh component. Keep section counts modest on mobile; the teleport arc uses a deliberately small number.
Example map
Visible as the teleport arc in Map_Examples_Teleporter.
Troubleshooting
The spline renders as straight segments. Too few sections for the curvature — increase the section count when creating the meshes.
API reference
Every blueprint asset in this plugin. Expand an asset to see its members.
Components
BPC_SplineMesh12 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | ColorStyle | LinearColor | Colour written into the spline mesh material. |
| var | Interp SpeedSettings | float | How quickly the mesh interpolates towards a new colour or end point. |
| var | ScaleStyle | float | Overall thickness multiplier for the spline mesh. |
| fn | TraceAndEndPoint | (TraceLength: float = 1000, out Hit: HitResult) | Traces forward along the spline direction and returns what it hit, so the spline can terminate on geometry. |
| fn | UpdateEndPoint | (EndLocation: Vector) | Moves the far end of the spline mesh to the given world location. |
| fn | SetExpand | (Percent: float) | Sets how much of the spline is drawn, from 0 for hidden to 1 for fully extended. |
| fn | SetColor | (Value: LinearColor) | Sets the spline's colour on its dynamic material at once, with no blend. Use the helper's animated variant instead when the change should be seen. |
| fn | getWorldEndLocationTransform | () → Vector | Returns the current world location of the spline's far end. |
| event | InterpolateToColor | (ref const NewColor: LinearColor) | Blends the spline colour towards the target over time. |
| event | Expand | (Set: bool, Duration: float) | Animates the spline extending or retracting over the given duration. |
| event | Show | (Set: bool) | Reveals the spline mesh. Passing false is ignored, so hide the mesh through the owning spline helper rather than expecting this to toggle both ways. |
| event | SetSizeScale | (Scale: float) | Changes the spline thickness at runtime. |
Helper
BP_Helper_Spline14 members
| Kind | Name | Signature | Description |
|---|---|---|---|
| var | RadiusStartSize | Vector2D | Cross-section radius at the start of the spline. Combine with Radius End to taper the shape. |
| var | RadiusEndSize | Vector2D | Cross-section radius at the end of the spline. |
| var | SplineSpline | SplineComponent | The spline component the meshes are laid along. |
| var | MaterialSettings | MaterialInterface | Material applied to every generated spline mesh section. |
| var | SplineColorColor | LinearColor | Colour written into the spline material. |
| fn | CreateSplineMeshesSpline | () | Generates the mesh sections along the spline. Call after changing the spline point count. |
| fn | UpdateSplineMeshesSpline | () | Repositions the existing mesh sections to match the current spline shape. |
| fn | ShowSplinePercentSpline | (Percent: float) | Reveals the spline up to the given fraction of its length, for animating an arc extending towards a target. |
| fn | SetSplineLocationsSpline | (StartLocation: Vector, EndLocation: Vector, ForwardVector: Vector) | Sets the spline's start and end points and the tangent direction, rebuilding the curve between them. |
| fn | SetSizeSize | (RadiusStart: Vector2D, RadiusEnd: Vector2D) | Sets the start and end radii immediately. |
| fn | InterpolateSizeSize | (RadiusStart: Vector2D, RadiusEnd: Vector2D, DeltaTime: float, InterpolationSpeed: float) | Blends the start and end radii towards new values over time. |
| fn | InterpolateColorColor | (Target: LinearColor, DeltaTime: float, InterpSpeed: float) | Blends the spline colour towards the target over time. |
| fn | SetColorColor | (Value: LinearColor) | Sets the colour of every mesh segment along the spline at once, with no blend. |
| event | SetExpand | (Set: bool, Duration: float, DestroyAfterCollapse: bool) | Animates the spline extending or collapsing, optionally destroying the actor once it has collapsed. |