Hi, i am beginner in unity and i have a problem now. I have a script that i run after i swipe up and that is working but when i swipe up second time it is not working. I cant figure out what the problem is so i apreciate every help that i can get. Thank you in advance.
else if (Mathf.Abs(distance.x) < Mathf.Abs(distance.y))
{
Debug.Log(“Vertical swipe”);
if (distance.y > 0)
{
Debug.Log("Up swipe");
player.GetComponent<Rotate>().BeginRotate();
}
if (distance.y < 0)
{
Debug.Log("Down swipe");
}
}