This page is API reference for a curve's section (BansheeGz.BGSpline.Curve.BGCurveBaseMath.SectionInfo) and approximation point (BansheeGz.BGSpline.Curve.BGCurveBaseMath.SectionPointInfo). You can access SectionInfo via math object. Math approximates the spline by adding a set of points along the spline's section and uses straight lines between these points for all calculations. You can access section information and these approximation points if you need to. The recommended alternative- is to use Splitter Polyline component, which can provide the same information without duplicate points
Method/Property | Returns | Description |
---|---|---|
DistanceFromStartToOrigin | float | Distance from curve's start to the start point of this section |
DistanceFromEndToOrigin | float | Distance from curve's start to the end point of this section |
Distance | float | Section's length |
Points | List<SectionPointInfo> | List of approximation points |
PointsCount | int | Total number of approximation points |
[int index] | SectionPointInfo | Get approximation point by its index |
Method/Property | Returns | Description |
---|---|---|
Position | Vector3 | Point's world position |
Tangent | Vector3 | Point's world tangent. Note: math should calculate tangents for this field to have a correct value |
DistanceToSectionStart | float | distance from the start of the section to this point |