debugged intersection of polygon
but always have problem in distance detection