Hi guys! Sorry in advance for my english
I’ve been playing around with Unity for Android, and I’ve encountered an undesirable behaviour about the way Input on the touch screen is handled; basically, I’m trying to make a something move when you drag a finger on screen, but there seems to be some kind of threshold on Touch.position and TouchPhase.Moved.
After some research on the docs, I’ve found that there is a useDragThreshold variable that can be set to false, but after I’ve done so, the threshold is still there, no matter of I use Touch.position or Touch.deltaPosition, the threshold in question is aprox. (after my testings) 10 pixels or so, which is not that much, and in a lot of cases it would be desirable to have such a threshold but I don’t want it, so… what should I do?
This is my code for disabling drag threshold:
public class character : MonoBehaviour, IInitializePotentialDragHandler {
...
public void OnInitializePotentialDrag (PointerEventData eventData){
eventData.useDragThreshold = false;
}
...
}
What am I doing wrong?