Bug with ArrayList

again, you delete the wrong point ( what i see )
and the cursor jump to different place and start walking to a new target.

and in code you do

momPos.add(…points.get(i-1)…points.get(i)

and then

points.remove(i-1);

??_______________________
pls. can you confirm that how it is happening in my version
is actually that what you want? because from your code i not see that.
and possibly you plan later a real operator shooting…
how i know?