title: Unity 2D drag and drop issue iDropHandler
body: <p>I have a draggable gameobject (brick) that implements IBeginDragHandler, IDragHandler, IEndDragHandler</p>
  
  <p>I also have another gameobject (slot) to drop the brick into that implements IDropHandler</p>
  
  <p>A quick look at the Bricks' OnBeginDrag method:</p>
  
  <pre><code>public static GameObject itemBeingDragged;
  Vector3 startPosition;
  Transform startParent;
  
  public void OnBeginDrag(PointerEventData eventData)
  {
      itemBeingDragged = gameObject;
      startPosition = transform.position;
      startParent = transform.parent;
      GetComponent&lt;CanvasGroup&gt;().blocksRaycasts = false;
      GetComponent&lt;BoxCollider2D&gt;().enabled = false;
  
  
  
  }
  </code></pre>
  
  <p>When i drop the brick into the slot, the brick assumes the slot as parent and also assumes the slots position, like so in the IDropHandler's OnDrop method code:</p>
  
  <pre><code>public void OnDrop(PointerEventData eventData)
      {
              DragHandler.itemBeingDragged.transform.SetParent(transform);
              DragHandler.itemBeingDragged.transform.position = transform.position;
      }
  </code></pre>
  
  <p>The problem with this is when i drag and drop the brick, i want there to be slight offset to the bricks position (e.g on a mobile phone, so that while dragging the brick, the brick is not visually hidden by my finger )</p>
  
  <p>So in the Bricks OnDrag code, i have something like that to give a visual offset:</p>
  
  <pre><code>public void OnDrag(PointerEventData eventData)
  {
  
      Vector3 offset = new Vector3(0, 100, 0);
      transform.position = Input.mousePosition + offset;
  
  
  }
  </code></pre>
  
  <p>I know the above is for mouse position but ultimately i want it to be touch position.</p>
  
  <p>This looks fine when dragging, however, when dropping it on the slot, it seems that the slot's OnDrop method is only called when the mouse pointer is above the slot, and not when the brick is above the slot. Meaning when i release the drag while the brick is above the slot, OnDrop doesn't get called. It is only called when I release the brick outside the slot in such a way that the mouse pointer is inside the slot. Make sense?</p>
  
  <p>IS there a way to make OnDrop work with the bricks position rather than the mouse position?</p>
  
  <p>Thanks
  Kevin</p>