Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnMouseDrag()
- {
- touchPos = Camera.main.ScreenToWorldPoint(touchPos);
- transform.position = new Vector2(touchPos.x, touchPos.y);
- }
- void Update()
- {
- touchPos = Input.mousePosition;
- }
Advertisement
Add Comment
Please, Sign In to add comment