added a method to check if the velocity of the pan is in the direction of the pan