Advertisement
Guest User

Untitled

a guest
Jul 29th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. private void Move() {
  2. mousePosition = Input.mousePosition;
  3. mousePosition = Camera.main.ScreenToWorldPoint(mousePosition);
  4. transform.position = Vector2.Lerp(transform.position, mousePosition, moveSpeed);
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement