Method GetSplinePosition
GetSplinePosition(MonoBehaviour, Transform, SplineContainer, float, PathIndexUnit, float)
Compute the desired position on the spline.
Declaration
float GetSplinePosition(MonoBehaviour sender, Transform target, SplineContainer spline, float currentPosition, PathIndexUnit positionUnits, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
MonoBehaviour | sender | The MonoBehaviour that is asking. |
Transform | target | The target object (may be null for algorithms that don't require it). |
SplineContainer | spline | The spline on which the location must be found. |
float | currentPosition | The current position on the spline. |
PathIndexUnit | positionUnits | The units in which spline positions are expressed. |
float | deltaTime | Current deltaTime. If smaller than 0, then previous frame data should be ignored. |
Returns
Type | Description |
---|---|
float | The desired position on the spline, expressed in positionUnits. |