As of now, when I touch my screen, I get about 5-10 outputs.
In addition, I have a swiping script, and when I begin the swipe, the tap if statement activates.
I need a way to add resistance and to prevent the tap if statement from running when I swipe.
if (Input.touchCount == 1 && idle == true)
{
p = true;
pSound.Play();
Debug.Log("Tap");
}
else if (Input.touchCount == 0)
{
p = false;
}
You will need to check the state of the touch. You can use TouchPhase to determine if a touch just came down, or is held stationary, or moving around…and so on.
Might get this free asset and read how this guy handles a lot of different input types: