Avoid small rotation when tapping on screen and not dragging.

May be question is a bit unclear. I have implemented touch and drag to rotate camera around player functionality. Almost everything is working fine, only one issue I have in this. When I touch on screen, camera rotates a bit which should not be happening. I want camera to rotate around player according player drag. Please check code below and let me know why it might be happening.

public void OnPointerDown(PointerEventData eventData)
        _lastPos = eventData.position;
        Debug.Log("On Pointer Down");
    public void OnPointerUp(PointerEventData eventData)
        Debug.Log("On pointer Up");
        _lastPos = Vector2.zero;
    public void OnPointerMove(PointerEventData eventData)
        var currentPos = eventData.position;
        var x = currentPos.x - _lastPos.x;
        x /= 10f;
        Debug.Log("X - " + x);
        _lastPos = currentPos;


If want to prevent rotating when dont necessary, you can just store the current rotation in a variable when start tapping, and assign that rotation (at the end ) / (during all) frames of tapping