Search Unity

Question Need two fingers to rotate an object and just one finger is needed

Discussion in 'Scripting' started by NewMagic-Studio, Sep 10, 2020.

  1. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    I use something like

    if (Input.touchCount>0)
    {
    Touch touch = Input.GetTouch(0);

    switch (touch.phase)
    {
    case TouchPhase.Began:
    break;
    case TouchPhase.Moved:
    mainCamera.transform.RotateAround(Vector3.zero, Vector3.up, pos.x * 10f);
    break;
    case TouchPhase.Ended:
    break;
    }
    }

    But when i try to rotate the object i realize i need two fingers instead of just one, why this happens?
     
  2. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    Tried with touchCount == 1 and just works with two fingers, dont understand, if touchCount is 1 why works just with 2 fingers?
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The first thing I would test is that you see this identical behavior on multiple devices.
     
  4. CATByte_Studio

    CATByte_Studio

    Joined:
    Jun 4, 2018
    Posts:
    8
    I am also getting this issue. Using the standard assets touch pad script for camera movement requires two fingers touching the screen instead of one. Changing the touchCount does not fix it.