0 votes

How would be the best way to transition from one animation to another? In my game, the player takes a little step (a short, two frame animation) before the running animation plays. I want the running animation to play the moment the little step one finishes. Any thoughts?

in Engine by (215 points)

2 Answers

0 votes

AnimationPlayer has a signal "finished", that will play when an animation finishes playing.

If you want to get more specific or direct in the control and timing, you can more finely control things using the other functions available, as seen in the docs: AnimationPlayer

by (5,245 points)

Gotcha. I've been referring to the docs. Wasn't sure of the proper syntax to do this. Finally got it after some fiddling. Thank you!

0 votes

Connect the player's finished signal to a "handler" function as avencherus said, or use yield()!
You can find examples (both solutions) in this topic.

by (674 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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.