← All namespaces

spline

Scene, level & world Experimental

Create and edit spline actors, components, points, and spline-mesh scattering.

What it’s for

This namespace works with splines in the active level: the curves themselves, their individual control points, and the meshes you lay out along them. You can spawn a fresh spline actor, add or remove points, move and rotate and scale each point, adjust its tangents, and switch a point (or a whole spline) between curve, linear, and constant types.

Use it whenever the shape you want to author is spline-driven: a road or path, a fence line, a cable, a pipe, or any run of repeated meshes that should follow a curve. Beyond the raw curve, it handles the spline-mesh side too — creating SplineMeshComponent actors, setting their mesh and material, picking the forward axis, and scattering static-mesh instances along a spline at a chosen spacing and alignment.

Reach for this namespace when the editable thing is a spline or a spline-driven mesh layout. Once a shape has been generated and you need to change the mesh topology directly, switch to call("geometry") instead.

This area is experimental: it works today, but method names and parameters are still changing as it matures. Treat the shapes below as current, not frozen.

Examples

Lay down a curved path

Ask for a new spline actor and hand it the points up front so the curve is ready to build on.

You: Create a spline called PathA that curves through three points near the origin.

  call("spline.create_spline_actor", {actorName:"PathA", splineType:"Curve",
        points:[{location:{x:0,y:0,z:0}}, {location:{x:400,y:200,z:0}}, {location:{x:800,y:0,z:0}}]})
    → {ok:true, actorName:"PathA", pointCount:3}

Done. Spawned PathA with a 3-point curve.

Extend an existing spline

Add another control point to the end of a spline that is already in the level.

You: Add a point to PathA at the end, out at x 1200.

  call("spline.get_splines_info", {actorName:"PathA"})
    → {actorName:"PathA", pointCount:3, bClosedLoop:false}
  call("spline.add_spline_point", {actorName:"PathA", position:{x:1200,y:200,z:0}, index:-1})
    → {ok:true, pointCount:4}

Done. PathA now has 4 points.

Scatter meshes along the curve

Drop static-mesh instances down the spline at a fixed spacing, turned to follow its direction.

You: Line fence posts along PathA every 300 units, aligned to the curve.

  call("spline.scatter_meshes_along_spline", {actorName:"PathA",
        meshPath:"/Game/Meshes/SM_FencePost", spacing:300, alignToSpline:true})
    → {ok:true, instanceCount:14}

Done. Placed 14 fence posts along PathA.

← Back to all namespaces