title: Hugging 2D object and moving around it
body: <p>I have an object generated dynamically into any shape.  It is built using a <code>LineRenderer</code> and has an <code>EdgeCollider</code> attached.  When a certain object comes into contact with this object I want it to "hug" it and move around it.</p>
  
  <p>If the object is the black line, I would like my object to follow the green line and do a full circle around the object.</p>
  
  <p><a href="https://i.stack.imgur.com/DSssN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DSssN.png" alt="enter image description here"></a></p>
  
  <p>I have read some information about RayCasting and things in the 3D world however being fairly new to Unity I'm not certain how I can do this in 2D.</p>
  
  <p>Any suggestions you have would be very much appreciated, a working example would be appreciated 1000 time more though! ;)</p>
  
  <p>Thanks in advance!</p>