My script makes camera to turn and look around but when i try to tap and shoot ray cast to change some objects position by hit information other functions are stopping to i cant look around anymore i dont get how this touch functions work can anyone help me to tell my mistake thank you for your help Code (CSharp): Vector2 startPos; Vector2 lastPos; bool touchStays = false; bool touchMoves = false; float turnleftRight; float turnupDown; public GameObject pos; void Update() { if (lastPos.x > startPos.x && touchStays == false && touchMoves == true) { turnleftRight++; } if (lastPos.x < startPos.x && touchStays == false && touchMoves == true) { turnleftRight--; } if (lastPos.y > startPos.y && touchStays == false && touchMoves == true) { turnupDown++; } if (lastPos.y < startPos.y && touchStays == false && touchMoves == true) { turnupDown--; } turnupDown = Mathf.Clamp(turnupDown, -90.0f, 90.0f); transform.rotation = Quaternion.Euler(-turnupDown, turnleftRight, 0); if (Input.touchCount > 0) { Touch touch = Input.GetTouch(0); if(touch.tapCount>0) { RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(touch.position); if (Physics.Raycast(ray, out hit, Mathf.Infinity)) { if (hit.transform.tag == "Ground") { pos.transform.position = hit.transform.position; } } } switch (touch.phase) { case TouchPhase.Began: startPos = touch.position; break; case TouchPhase.Moved: touchStays = false; touchMoves = true; lastPos = touch.position; break; case TouchPhase.Stationary: touchStays = true; touchMoves = false; break; case TouchPhase.Ended: touchStays = false; touchMoves = false; break; } } } }