28.05.2015, 21:18
That if-statement can never be true. You need to compare distance to the old position, not the new one.
See example on this page for efficient GetDistanceBetweenPoints.
See example on this page for efficient GetDistanceBetweenPoints.