---
title: AFM_Spline
product: Advanced Framework Pro
version: 1.0
engine: Unreal Engine 5.8
updated: 2026-10-05
canonical: https://docs.human-codeable.com/plugins/afm-spline.html
---

Module

# 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

None

#### Required by

None

2 assets30 API members

## 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

1. Enable `AFM_Spline`.
2. Spawn or place a `BP_Helper_Spline`.
3. Set **Radius Start**, **Radius End** and **Material**.
4. Call `SetSplineLocations` to 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

Performance

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_SplineMesh**16 members

extends `SplineMeshComponent`

Spline mesh component drawing a single beam from itself to an end point, set directly or found by a line trace. Colour changes interpolate rather than snap, and Set Expand drives the material's linear mask so the beam can grow and retract. Add it where a short pointer line is wanted without spawning the spline helper actor.

| Kind | Name | Signature | Description |
|---|---|---|---|
| var | `Color`Style | `LinearColor` | Colour written into the spline mesh material. |
| var | `Interp Speed`Settings | `float` | How quickly the mesh interpolates towards a new colour or end point. |
| var | `Scale`Style | `float` | Overall thickness multiplier for the spline mesh. |
| var | `Expanded`State | `bool` | Whether the beam starts out drawn at its full length. Read once by Set Initial Expand State, which runs the expand timeline straight to that end rather than animating into it, so this is a starting state and not a live switch. Use Expand or Set Expand once play has begun. |
| var | `Shown`State | `bool` | Whether the beam starts out visible. Read once by Set Initial Show State, which drives the material's opacity to that end and hides the mesh in game when it ends up retracted. A starting state only, and remember that Show ignores false, so hiding the beam again goes through the owning spline helper. |
| fn | `getWorldEndLocation`Transform | `() → Vector` | Returns the current world location of the spline's far end. |
| fn | `SetColor`Default | `(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 | `SetExpand`Default | `(Percent: float)` | Sets how much of the spline is drawn, from 0 for hidden to 1 for fully extended. |
| fn | `UpdateEndPoint` | `(EndLocation: Vector)` | Moves the far end of the spline mesh to the given world location. |
| fn | `TraceAndEndPoint`Default | `(TraceLength: float, out Hit: HitResult)` | Traces forward along the spline direction and returns what it hit, so the spline can terminate on geometry. |
| event | `InterpolateToColor` | `(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. |
| event | `SetInitialExpandState` | `()` | Puts the beam into the state Expanded asks for without animating it, by running the expand timeline over 0.016 seconds. Meant for start-up: calling it later snaps the beam instead of moving it. |
| event | `SetInitialShowState` | `()` | Puts the beam into the state Shown asks for without animating it. A 0.016 second timeline drives the material's Opacity parameter to the target, and when it finishes going backwards the mesh is hidden in game as well, so a beam that starts invisible costs nothing to draw. |

### Helper

**BP_Helper_Spline**14 members

extends `Actor`

Tube-drawing actor: it builds a chain of spline meshes along a spline and can set the two end points, the start and end radius, the colour and how much of the length is drawn. The laser beam, the teleport arc and the label leader lines are all this actor. Spawned by whatever needs a curve; pass an existing spline component on spawn to follow that instead of its own.

| Kind | Name | Signature | Description |
|---|---|---|---|
| var | `Radius Start`Size | `Vector2D` | Cross-section radius at the start of the spline. Combine with Radius End to taper the shape. |
| var | `Radius End`Size | `Vector2D` | Cross-section radius at the end of the spline. |
| var | `Spline`Spline | `SplineComponent` | The spline component the meshes are laid along. |
| var | `Material`Settings | `MaterialInterface` | Material applied to every generated spline mesh section. |
| var | `Spline Color`Color | `LinearColor` | Colour written into the spline material. |
| fn | `SetColor`Color | `(Value: LinearColor)` | Sets the colour of every mesh segment along the spline at once, with no blend. |
| fn | `InterpolateColor`Color | `(Target: LinearColor, DeltaTime: float, InterpSpeed: float)` | Blends the spline colour towards the target over time. |
| fn | `InterpolateSize`Size | `(RadiusStart: Vector2D, RadiusEnd: Vector2D, DeltaTime: float, InterpolationSpeed: float)` | Blends the start and end radii towards new values over time. |
| fn | `SetSize`Size | `(RadiusStart: Vector2D, RadiusEnd: Vector2D)` | Sets the start and end radii immediately. |
| fn | `SetSplineLocations`Spline | `(StartLocation: Vector, EndLocation: Vector, ForwardVector: Vector)` | Sets the spline's start and end points and the tangent direction, rebuilding the curve between them. |
| fn | `ShowSplinePercent`Spline | `(Percent: float)` | Reveals the spline up to the given fraction of its length, for animating an arc extending towards a target. |
| fn | `UpdateSplineMeshes`Spline | `()` | Repositions the existing mesh sections to match the current spline shape. |
| fn | `CreateSplineMeshes`Spline | `()` | Generates the mesh sections along the spline. Call after changing the spline point count. |
| event | `SetExpand` | `(Set: bool, Duration: float, DestroyAfterCollapse: bool)` | Animates the spline extending or collapsing, optionally destroying the actor once it has collapsed. |
