PathGeneratorCreateSplineWithSegmentDistance Method |
Creates a spline path that curves around points in a list. This tries to maintain a similar distance between spline segments, regardless of distance between the initial points.
Namespace:
DigitalRuby.ThunderAndLightning
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public static bool CreateSplineWithSegmentDistance(
ICollection<Vector3> path,
IList<Vector3> points,
float distancePerSegment,
bool closePath
)
Public Shared Function CreateSplineWithSegmentDistance (
path As ICollection(Of Vector3),
points As IList(Of Vector3),
distancePerSegment As Single,
closePath As Boolean
) As Boolean
public:
static bool CreateSplineWithSegmentDistance(
ICollection<Vector3>^ path,
IList<Vector3>^ points,
float distancePerSegment,
bool closePath
)
static member CreateSplineWithSegmentDistance :
path : ICollection<Vector3> *
points : IList<Vector3> *
distancePerSegment : float32 *
closePath : bool -> bool
Parameters
- path
- Type: System.Collections.GenericICollectionVector3
Receives the path points. Collection is not cleared. - points
- Type: System.Collections.GenericIListVector3
Points for the spline to follow. Must contain at least 4 points. - distancePerSegment
- Type: SystemSingle
The distance that each segment should be in the spline. This is approximate. - closePath
- Type: SystemBoolean
True to loop back to the start, false otherwise
Return Value
Type:
BooleanTrue if success, false if points length is too small
See Also