HTC vive swipe detection

Hello everyone!

I’ve been trying to achieve a script that detects swiping movement on the HTC vive controller touchpad. By that I mean the usual movement we do on our smartphones to pass from a home screen to another, to like or dislike someone on tinder, to pass to a new story on instagram… You get the idea: the tumb needs to consistantly touch the pad and move horizontally faster than a threshold speed.

using System.Collections;
using System.Collections.Generic;
using Valve.VR;
using UnityEngine;

public class ViveInput : MonoBehaviour
{
 
    public SteamVR_Action_Vector2 touchPadAction;
    public float swipeSpeed;


    void Update()
    {
        Vector2 touchPadValue = touchPadAction.GetAxis(SteamVR_Input_Sources.Any);
        Vector2 delta = touchPadAction[SteamVR_Input_Sources.Any].delta;

        if (touchPadValue != Vector2.zero)
        {
            if (delta[0] > swipeSpeed)
            print("NOPE");

            if (delta[0] < -1*swipeSpeed)
                print("LIKE");
        }
    }
}

No matter which swipeSpeed I use, it isn’t working properly. The console displays LIKE or NOPE even if I just touch a side of the touchpad, regardless of whether there’s a movement or not. Am I missing something on this delta thing? Would it be more effective to pass on the touchPadValue to a function and calculate the speed on each update?

Thank you for reading!

Up?