I have a script to detect a player touching an object and dragging their finger in a direction, in order to move the object in that direction. The problem is the script will also move the object if the player just taps on the object without moving their finger at all. I tried to change the various "0's" to 10/-10 in the TouchPhase.Ended if statements. I thought that would make sure the players finger actually moved... but that didn't work out correctly either. I actually want the "single tap" to be able to do it's own thing also. Code (csharp): function Update() { if ( Input.touchCount > 0 ) { // --------- raycasting ---------- var hit : RaycastHit; var ray : Ray = Camera.main.ScreenPointToRay(Input.GetTouch(0).position); // get finger touch position if ( rayCastHitObject ) { if (Input.GetTouch(0).phase == TouchPhase.Moved) { touch2H = Input.GetTouch(0).position.x; touch2V = Input.GetTouch(0).position.y; } if ( Input.GetTouch(0).phase == TouchPhase.Ended) { if (touch1H-touch2H > 0 (Mathf.Abs(touch1H-touch2H)) > (Mathf.Abs(touch1V-touch2V)) ) { print("Left"); // moving code } else if (touch1H-touch2H < 0 (Mathf.Abs(touch1H-touch2H)) > (Mathf.Abs(touch1V-touch2V)) ) { print("Right"); // moving code } else if (touch1V-touch2V < 0 (Mathf.Abs(touch1H-touch2H)) < (Mathf.Abs(touch1V-touch2V)) ) { print("Up"); // moving code } else if (touch1V-touch2V > 0 (Mathf.Abs(touch1H-touch2H)) < (Mathf.Abs(touch1V-touch2V)) ) { print("Down"); // moving code } if (moving != -1) { // all my moving code is here print ("Moving object") rayCastHitObject = false; } touch2H = Input.GetTouch(0).position.x; touch2V = Input.GetTouch(0).position.y; } } else if (Physics.Raycast(ray, hit, rayDistance)) { if (hit.transform.tag == tagName) { raycastObject = hit.transform; touch1H = Input.GetTouch(0).position.x; touch1V = Input.GetTouch(0).position.y; rayCastHitObject = true; } } } }