*/
private void updateCurrentPoint() {
InlineComponent straight = (InlineComponent)added.get(added.size()-1);
- // TODO: the inline length is from previous update step.
- double l = straight.getPrevious().getControlPoint().getInlineLength();
+ // TODO: the inline length is from previous update step.
+ double l;
+ if (!reversed)
+ l = straight.getPrevious().getControlPoint().getInlineLength();
+ else
+ l = straight.getNext().getControlPoint().getInlineLength();
Vector3d v = new Vector3d();
v.sub(currentPosition, previousPosition);
double length = v.length();