Class CinemachineSmoothPath
This is a deprecated component. Use SplineContainer instead.
Inheritance
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[Obsolete("CinemachinePathBase has been deprecated. Use SplineContainer instead")]
[AddComponentMenu("")]
[DisallowMultipleComponent]
public class CinemachineSmoothPath : CinemachinePathBase
Fields
m_Looped
If checked, then the path ends are joined to form a continuous loop
Declaration
[Tooltip("If checked, then the path ends are joined to form a continuous loop.")]
public bool m_Looped
Field Value
Type | Description |
---|---|
bool |
m_Waypoints
The waypoints that define the path. They will be interpolated using a bezier curve
Declaration
[Tooltip("The waypoints that define the path. They will be interpolated using a bezier curve.")]
public CinemachineSmoothPath.Waypoint[] m_Waypoints
Field Value
Type | Description |
---|---|
Waypoint[] |
Properties
DistanceCacheSampleStepsPerSegment
When calculating the distance cache, sample the path this many times between points
Declaration
public override int DistanceCacheSampleStepsPerSegment { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Looped
True if the path ends are joined to form a continuous loop
Declaration
public override bool Looped { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
MaxPos
The maximum value for the path position
Declaration
public override float MaxPos { get; }
Property Value
Type | Description |
---|---|
float |
Overrides
MinPos
The minimum value for the path position
Declaration
public override float MinPos { get; }
Property Value
Type | Description |
---|---|
float |
Overrides
Methods
EvaluateLocalOrientation(float)
Get the orientation the curve at a point along the path.
Declaration
public override Quaternion EvaluateLocalOrientation(float pos)
Parameters
Type | Name | Description |
---|---|---|
float | pos | Position along the path. Need not be normalized. |
Returns
Type | Description |
---|---|
Quaternion | Local orientation of the path, as defined by tangent, up, and roll. |
Overrides
EvaluateLocalPosition(float)
Get a local space position of a point along the path
Declaration
public override Vector3 EvaluateLocalPosition(float pos)
Parameters
Type | Name | Description |
---|---|---|
float | pos | Position along the path. Need not be normalized. |
Returns
Type | Description |
---|---|
Vector3 | Local position of the point along at path at pos |
Overrides
EvaluateLocalTangent(float)
Get the tangent of the curve at a point along the path.
Declaration
public override Vector3 EvaluateLocalTangent(float pos)
Parameters
Type | Name | Description |
---|---|---|
float | pos | Position along the path. Need not be normalized. |
Returns
Type | Description |
---|---|
Vector3 | Local direction of the path tangent. Length of the vector represents the tangent strength |
Overrides
InvalidateDistanceCache()
Call this if the path changes in such a way as to affect distances or other cached path elements
Declaration
public override void InvalidateDistanceCache()