+1 vote

I've got a couple of characters which have a spawning animation. Right now I'm calling AnimationPlayer.play("spawn") on the character's _ready(), the thing is it seems to wait for the next cycle after being added to the tree before starting out the animation so for a split second you can see the character in it's idle pose.

I found that I can avoid this issue by saving the character's scene with the character in the spawn animation's initial frame but it's very awkward and error prone when placing during editing since some of them are not even visible.

So to reiterate the question:
When's the time to start the spawning animation in order to avoid this issue?
Am I doing something wrong?

in Engine by (76 points)

I'm think in the animation tab there is an option to pick the default animation, I'm not sure tho, been a while since I did something with animations, if it is true tho pretty sure I found it out on one of these youtube tutorials

1 Answer

+1 vote

yup, checked it, pretty sure that should do this
go to the animation you want to start with and toggle the autoload button

use the animation_finished() signal to change the animation to idle after this one is done.

by (307 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 [email protected] with your username.