I have a joystick that plays two animations, one when pressed/dragged and one at the time of releasing it, does its job, but halfway, it only looks good if the joystick is pressed for several seconds, however if one quickly presses the joystick the animation when you stop pressing the joystick plays, generating an animation error.
The animation plays earlier than it should.
So I would like to make the joystick able to check that it is being pressed for a few seconds to authorize the animation to run. Is there any way to do this? Thank you in advance.