Added linearPath flag to perform linear interpolation to the destination.