I’m having problems with Unity touch, does not recognize all ringtones and pressing the player is stopped

Asked

Viewed 15 times

-3

need help, qro click on the screen and every touch change gravity

my Cod: (ta no update)

if (Input.touchCount > 0)
    
    {
        eixo *= -1;
    }

but it seems that he doesn’t recognize all the touches and if you keep pressing vc to the player, but no matter what happens, someone can help me, please?

1 answer

-1

I’ve managed to fix it, if anyone needs any day, ta aq:

if (Input.touchCount > 0)

    {
        Touch touch = Input.GetTouch(0);
        if(touch.phase == TouchPhase.Began)
        {
            eixo *= -1;
        }
        else
        {
            eixo = eixo;
        }
        
      
    }

Browser other questions tagged

You are not signed in. Login or sign up in order to post.