public Vector3 GetVelocityOnSegment(float t, int segment) { return(Bezier.GetFirstDerivative(SplinePoints[segment].transform.position, GetControlPointWorldPos(segment + segment), GetControlPointWorldPos(segment + segment + 1), SplinePoints[segment + 1].transform.position, t)); }
public Vector3 GetAccelerationOnSegment(float t, int segment) { return(Bezier.GetSecondDerivative(SplinePoints[segment].transform.position, GetControlPointWorldPos(segment + segment), GetControlPointWorldPos(segment + segment + 1), SplinePoints[segment + 1].transform.position, t)); }
public Vector3 GetPointOnSegment(float t, int segment) { return(Bezier.GetPoint(SplinePoints[segment].transform.position, GetControlPointWorldPos(segment + segment), GetControlPointWorldPos(segment + segment + 1), SplinePoints[segment + 1].transform.position, t)); }