if (intersectionPoint == null)
return null;
else
//return distance form base to target position
return intersectionPoint.sub(targetPos);
}
/**
* Gathers possible move directions - perpendicular to the selected segment
* and parallel to neighboring segments.