Click or drag to resize

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
)

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: Boolean
True if success, false if points length is too small
See Also