calculating distance between point <-> path || group, applying behavior to a group