Hi I am touching the screen and then swiping across screen to detect the colliders on the screen.The problem when I swipe the colliders are not detected.When I touch on the collider and thenn swipe across the collider it is detected.
Normally when our touch hits the boxcollider2D it should detect.
if(Input.touchCount > 0)
{
if(Input.GetTouch(0).phase==TouchPhase.Began )
{
Debug.Log("Touched Screen");
}
if(Input.GetTouch(0).phase==TouchPhase.Moved && hit.collider.tag == "TouchLines")
{
Debug.Log("Touched Line containing collider");
audiosource.Play();
}
}