k0fe

Untitled

Dec 14th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.23 KB | None | 0 0
  1.     void OnMouseDrag()
  2.     {
  3.         touchPos = Camera.main.ScreenToWorldPoint(touchPos);
  4.         transform.position = new Vector2(touchPos.x, touchPos.y);
  5.     }
  6.     void Update()
  7.     {
  8.         touchPos = Input.mousePosition;
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment