Add logic to detect a hit on a line