I am using mouse position to draw a line using line renderer 2d. What i want is when the line hits a collider it should start to draw on the edge of the collider rather than over the collider. Something like this:
The line renderer will still draw using mouse position. It will just draw on the edge of a collider and move in the direction of mouse postion.