I am currently using drawPolyLine(int, int, int.length) to draw a line representing the ground coordinates for a platforming game. However, the endpoints are leaving streaks when I scroll across the screen. I fixed the one that was at the end by simply using vals.length - 1 (for the length of the array) instead of vals.length
I know for a fact that both the arrays I am passing in for coordinates, xVals and yVals, are the same length. I am wondering why the first point leaves a line behind as it scrolls.