setLinearHeadingInterpolation

public void setLinearHeadingInterpolation(double startHeading, double endHeading)

This sets the heading interpolation to linear with a specified start heading and end heading for the Path. This will interpolate across the entire length of the Path, so there may be some issues with end heading accuracy and precision if this is used. If a precise end heading is necessary, then use the setLinearHeadingInterpolation(double startHeading, double endHeading, double endTime) method.

Parameters

startHeading

The start of the linear heading interpolation.

endHeading

The end of the linear heading interpolation. This will be reached at the end of the Path if no end time is specified.


public void setLinearHeadingInterpolation(double startHeading, double endHeading, double endTime)

This sets the heading interpolation to linear with a specified start heading and end heading for the Path. This will interpolate from the start of the Path to the specified end time. This ensures high accuracy and precision than interpolating across the entire Path. However, interpolating too quickly can cause undesired oscillations and inaccuracies of its own, so generally interpolating to something like 0.8 of your Path should work best.

Parameters

startHeading

The start of the linear heading interpolation.

endHeading

The end of the linear heading interpolation. This will be reached at the end of the Path if no end time is specified.

endTime

The end time on the Path that the linear heading interpolation will finish. This value ranges from [0, 1] since Bezier curves are parametric functions.