Animation glitch when spamming

When I press the draw card button, The card animates from the card deck(I didn’t add the jpg yet) to my hand.
image

When I spam the button, the card animates to a different position.

image

And when I spam faster, it slowly goes back to the starting position. Also when I click on the button, it doesn’t register for some reason? Is there a way to fix that?

Maybe disable the button until the animation has completed?

I only know how to perma disable after I click the button, how to temp disable it?

How are you animating the cards?

Gsap
image

The library seems to have an onStart and an onComplete callback.
I would look at using those.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.