Can detect collision between line and object, object and boundary