title: Why error is showing "ArgumentException: Index out of bounds." when I get touch delta position in Unity?
body: <p>I am trying to rotate a gameObject using raycast. When I run unity editor getting the error </p>
  
  <blockquote>
    <p>ArgumentException: Index out of bounds. UnityEngine.Input.GetTouch
    (Int32 index) (at
    /Users/builduser/buildslave/unity/build/artifacts/generated/bindings_old/common/Core/InputBindings.gen.cs:619)
    AdjustTransform.Update () (at Assets/AdjustTransform.cs:27)</p>
  </blockquote>
  
  <p>Line 27 is 
  <code>Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;</code>
  in the below code. What I am doing wrong here?</p>
  
  <pre><code> void Update()
  {
      Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
      RaycastHit hit;
  
      Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;
  
      if (Physics.Raycast(ray,out hit,100))
      {
  
          Debug.Log(" GO Name "+hit.collider.gameObject.name);
      }
  
  if(  Input.touchCount == 2 &amp;&amp; !EventSystem.current.IsPointerOverGameObject() )
      {
  
  
              hit.collider.gameObject.transform.Rotate(Vector3.up, -touchDeltaPosition.x * rotspeed * Time.deltaTime, Space.World);
              hit.collider.gameObject.transform.Rotate(Vector3.right, touchDeltaPosition.y * rotspeed * Time.deltaTime, Space.World);
  
  
      }
  </code></pre>