LineRenderer physics

Hi everybody,
I want to create line control like this game:

I used Line Renderer and Physics2D.RaycastHit to fire a ray to find nearest Collider2D. My expected result is hit.point return first point where the raycast hit the Collider2D (see image below) . But some frame result is another hit point on collider’s surface.

Does anyone solve this problem?

Hey did you succeed in making the rope?