Curve:step

Edit

Steps along the curve a given distance and returns the curve parameter at that point. This is the inverse of Curve:getLength.

t = Curve:step(distance, iterations)

Arguments

NameTypeDefaultDescription
distancenumber The distance to step along the curve.
iterationsnumber16 How many iterations to use to compute the result. More iterations will give a more accurate result, but will take longer to compute.

Returns

NameTypeDescription
tnumber The parameter of the curve at the given distance along the curve.

See also