Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var speed : float = 0.01;
- function Update () {
- if (Input.touchCount > 0 &&
- Input.GetTouch(0).phase == TouchPhase.Moved) {
- var touchDeltaPosition:Vector2 = Input.GetTouch(0).deltaPosition;
- transform.Translate (-0,
- -touchDeltaPosition.x * speed, 0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement