0 votes

Hi people,..
i have animated sprite with multiple animation, when i press specific keyboard key one of them is playing, but the problem is that if i press the key quickly (quick press and release), just beginning frames of animation plays. how can i calculate the intervals of key pressing and disable the specific animation if pressing intervals is smaller than animation time?
thank you

(p.s: i use godot v2.1.5)

asked Sep 11, 2018 in Engine by mdswamp (69 points)

1 Answer

0 votes

I don't know how short are your animations but you can try something like:

Have a timer with the minimal interval time you want to wait to play the animation, say 0.1secs , when the key is down run the timer if it's not, and then with the timer's time out signal connected to the function that runs the animation.

answered Sep 12, 2018 by hinasis (230 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.