I have been working with the controls for mobile devices and have the clicking working fine.
However I want to implement swipes and have a small issue of when you attempt to swipe (on the initial touch) it clicks on the initial swipe action. Since my screen is full all the time it becomes very problem-some if you click when performing a swipe.
Is there a way of having mobile devices have a onMouseUp type of detection? It might be small and I am just overlooking it.
Current code for touch:
if (Input.touchCount == 1) {
if (Input.GetTouch(0).phase == TouchPhase.Began)
{
Ray ray = Camera.main.ScreenPointToRay
(Input.GetTouch(0).position);
RaycastHit hit = new RaycastHit();
if (collider && collider.Raycast (ray,out hit,
100.0f))
{OnMouseDown();}
} }
Thanks