Skip to content
Snippets Groups Projects
Commit 79bdcfe2 authored by Tobias Schöner's avatar Tobias Schöner
Browse files

fix: prevent dragged facts jump in first frame of drag

parent 4f816c22
No related branches found
No related tags found
No related merge requests found
......@@ -15,11 +15,11 @@ public void OnDrag(PointerEventData eventData)
GetComponent<CanvasGroup>().blocksRaycasts = false;
dragged = true;
}
transform.position = Input.mousePosition;
// display dragged object in front of all other ui
transform.SetParent(GetComponentInParent<Canvas>().transform, false);
transform.SetAsLastSibling();
transform.position = Input.mousePosition;
}
public void OnEndDrag(PointerEventData eventData)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment