I use the method

public void OnDrag(PointerEventData eventData) { m_VerticalVirtualAxis.Update( eventData.delta.y); m_HorizontalVirtualAxis.Update( eventData.delta.x); } 

to change virtual axes. In the editor, everything works well, but on the device, after the finger has changed, then after a split second, the position (touch points) is recalculated and the delta changes sign. How to deal with this?

    1 answer 1

    Depending on what kind of touch is on the device, its accuracy can vary greatly. To deal with random triggers, we got DeadZone where the value [0-1] was written, say 0.1f or the fraction of the screen, within which the offset was not taken into account