How can i check if a rectangle (the player) have collided with a line?