detect lines collision