Waypoint
public class Railcam2D.Waypoint;
Waypoints define the position and shape of a Rail's 2D path through a scene, and the axis the camera follows the target along.
Public Members
CurveControlPoint
public Vector2 CurveControlPoint = new Vector2(0, 0);
Member | Field |
Type | UnityEngine.Vector2 |
Defaults To | new Vector2(0, 0) |
A Vector2
that determines the position of the control point of a quadratic bezier curve that starts at this Waypoint and ends at the next Waypoint of the Rail.
This value is used only when
CurveType
is set toQuadratic
, and ignored whenCurveType
is set toLinear
.
CurveType
public CurveType CurveType = CurveType.Linear;
Member | Field |
Type | Railcam2D.CurveType |
Defaults To | Railcam2D.CurveType.Linear |
A CurveType
enum value that determines whether the Rail segment that starts at this Waypoint and ends at the next Waypoint is a straight line (Linear
) or a quadratic bezier curve (Quadratic
).
If set to Quadratic
, the CurveControlPoint
is used to determine the shape of the curve.
FollowAxis
public FollowAxis FollowAxis = FollowAxis.XY;
Member | Field |
Type | Railcam2D.FollowAxis |
Defaults To | Railcam2D.FollowAxis.XY |
A FollowAxis
enum value that determines the camera's alignment with its target position while traversing the segment of the Rail that starts at this Waypoint and ends at the next Waypoint.
The camera is positioned on the Rail at either the closest point (XY
) to the target, or either horizontally aligned (X
) or vertically aligned (Y
) with the target.
Position
public Vector2 Position = new Vector2(0, 0);
Member | Field |
Type | UnityEngine.Vector2 |
Defaults To | new Vector2(0, 0) |
A Vector2
that determines the 2D position of the Waypoint in the scene.