Thank you for your answers, I used a mathematical equation that finds if the mouse point is on the line between the curves