- Home /
Unity Touch Help!
Good morning, I am new to unity and C #, and even though I have read and seen tutorials everywhere, I cannot understand how touch works.
I need your help if possible. What I need is to know how to differentiate between a simple touch on the screen, or when the user drags his finger. In the game I'm creating, you should find hidden elements in an image, with a tap, you should indicate where you think the object is, and by zooming, you should be able to drag your finger on the screen to move around the image, and touch where you think the object is.
I just need to know how to tell the difference between simple touch and drag.
Currently I move the camera like this when the user zooms: CameraZoom.transform.Translate (Input.GetTouch (0) .deltaPosition Time.deltaTime 1f);
To detect the simple touch on the screen, I currently use the function: if (Input.GetMouseButtonDown (0)) but i would like to use the touch function