Spline
This feature is in preview release and is subject to change. 
You can use the Spline component to create line and curves in Lumberyard Editor. A spline is a curve that connects two or more specific points. You can use the Spline component to animate objects along a spline, such as a road or river.
Spline Properties
See the following Spline properties:
Name  Description 

Visible 
The Spline component always appears in the viewport, even if the entity is not selected. 
Spline Type 
Interpolation type to use between vertices. The component supports the following spline types:
Default value: Linear 
Vertices 
Vertices that the spline uses, which is a Vector3. You can switch the spline type and use the same values for the vertices. Note Linear and Bézier splines must have a minimum of two vertices. CatmullRom splines must have a minimum of four vertices. 
Closed 
Lets you specify if a spline is a closed or open loop. Default value: 
Granularity 
Number of steps for each segment that are in the spline. A step is one of the many short lines that are arranged to approximate the shape of the curve. A segment is defined as the part of the spline between two vertices. This property is available only for Bézier and CatmullRom spline types. Default value: Valid values: 
Knot Parameterization 
Adjusts the curvature and smoothness of the spline. Specify a value to support parameterization. A value of For more information, see Knot Parameterization examples. This property is available only for the CatmullRom spline type. Default value: Valid values: 
By default, a Spline component has four vertices that are spaced evenly in a line. The vertex positions are all stored in the local space of the entity.
Working with Spline Components
You can move the vertices in the local space of the entity along each axis. Each vertex has a planar, linear, and surface manipulator; combined, these are called the translation manipulator. You can use the translation manipulator to move the vertices.
To change the vertex positions for a spline

Do one of the following:

In the Spline component property window, change the vertex values.

Select a vertex on the component and then drag the blue, green, or red arrow to the position that you want.

Select a vertex on the component and then drag the yellow point to move the vertex. The yellow point is the surface manipulator.

Note
The manipulators follow the grid snap setting that you can specify in Lumberyard Editor toolbar. For more information, see Using the Top Toolbar.
Note
If the entity is scaled, the manipulators continue to behave correctly, but the scaling must be uniform, so that the x, y, and z scale values match.
You can also select multiple vertices.
To select multiple vertices on a spline

Hold Shift and then select the vertices that you want. Selected vertices appear yellow.
Note
Currently, you cannot click and draw a box around the vertices to select them.
You can also snap a vertex to another position on the terrain.
To snap a vertex to another position

Select a vertex.

Hold Shift+Ctrl and then click another position on the terrain. The vertex snaps to that position.
You can also add vertices to the spline.
To add a vertex to a spline

Pause over a line, and hold Ctrl. A preview appears where you can add the vertex.

Click to add the vertex to the spline.
You can also delete vertices from the spline.
To delete a vertex from the spline

Hold Alt and pause on a vertex. The vertex appears gray.

Click the vertex to delete it. You can also select a vertex and press Delete.
If you change the spline type, the component is updated to represent the new interpolation method.
Example CatmullRom
Note
The first and last vertices of a CatmullRom spline are only control points; they do not form part of the curve. A wellformed CatmullRom spline must have a minimum of four vertices. The spline does not render if there are fewer than four vertices.
The following examples show how CatmullRom splines change when you adjust the Knot Parameterization property.
Example Knot Parameterization = 0
Example Knot Parameterization =1
Example Linear and Bézier Splines
The following examples are linear and Bézier splines with the same vertices, but with open and closed loops.
EBus Request Bus Interface
Use the following request functions with the SplineComponentRequestBus
EBus interface to communicate with other components of your game. The
Spline component also uses VertexContainer
functions. For more information, see Vertex Containers.
For more information about using the event bus (EBus) interface, see Working with the Event Bus (EBus) System.
Request Name  Description  Parameters  Return  Scriptable 

GetSpline 
Returns a constant pointer to the underlying spline type. You can use this function to query the spline against raycasts and positions. You can also request information, such as the length of the spline, its position, normal, and tangent at various points along the spline. 
None 
AZ::ConstSplinePtr 
Yes 
ChangeSplineType 
Changes the spline type. The For example,

AZ::u64 
None  Yes 
SetClosed 
Specify whether the spline forms a closed or open loop. 
Boolean  None  Yes 
Example
The following script uses the request bus interface.
local spline = SplineComponentRequestBus.Event.GetSpline(self.entityId);  GetNearestAddressPosition local posSplineQueryResult = spline:GetNearestAddressPosition(Vector3(0, 0, 0)); posSplineQueryResult.splineAddress posSplineQueryResult.splineAddress.segmentIndex posSplineQueryResult.splineAddress.segmentFraction posSplineQueryResult.distanceSq  GetNearestAddressRay local raySplineQueryResult = spline:GetNearestAddressRay(Vector3(10, 1, 0), Vector3(0, 1, 0)); raySplineQueryResult.splineAddress.segmentIndex raySplineQueryResult.splineAddress.segmentFraction raySplineQueryResult.distanceSq raySplineQueryResult.rayDistance local splineAddressFromDistance = spline:GetAddressByDistance(3.0); local splineAddressFromFraction = spline:GetAddressByFraction(0.75);  Test SplineAddress Constructor (1 param) local splineAddress_1 = SplineAddress(2);  Test SplineAddress Constructor (2 params) local splineAddress_2 = SplineAddress(1, 0); spline:GetPosition(splineAddress_1) spline:GetNormal(splineAddress_1) spline:GetTangent(splineAddress_1) spline:GetLength(splineAddress_1) spline:GetSplineLength() spline:GetSegmentLength(1) spline:GetSegmentCount() spline:GetSegmentGranularity() local aabb = spline:GetAabb(Transform:CreateIdentity()); local closed = spline:IsClosed(); local firstVertex = spline.vertexContainer[1]; local lastVertex = spline.vertexContainer[spline.vertexContainer:Size()];  Attention: You can use the bus interface directly, but here (at the moment at least) indexing will start from 0, not 1 as is the norm in Lua. Instead, you should use the functions directly on the VertexContainer, listed below SplineComponentRequestBus.Event.AddVertex(self.entityId, lastVertex + Vector3(1, 2, 3)); SplineComponentRequestBus.Event.UpdateVertex(self.entityId, 0, firstVertex + Vector3(1, 2, 3)); SplineComponentRequestBus.Event.InsertVertex(self.entityId, spline.vertexContainer:Size()  1, lastVertex + Vector3(1, 2, 3)); SplineComponentRequestBus.Event.ClearVertices(self.entityId); SplineComponentRequestBus.Event.RemoveVertex(self.entityId, spline.vertexContainer:Size()  1);  Prefer these functions  indexing will start from 1 spline.vertexContainer:AddVertex(lastVertex + Vector3(1, 2, 3)); spline.vertexContainer:UpdateVertex(1, firstVertex + Vector3(1, 2, 3)); spline.vertexContainer:InsertVertex(spline.vertexContainer:Size(), lastVertex + Vector3(1, 2, 3)); spline.vertexContainer:ClearVertices(); spline.vertexContainer:RemoveVertex(spline.vertexContainer:Size());