0 votes

I am making a scene in Godot with a human hand and 5 sliders. Each slider controls the position of corresponding finger by manipulating the corresponding animation in the AnimationPlayer.
For example, the slider "Index" can take values from 0 to 1.25. Using the code

slidertime = slider.value
anim_player.seek(slidertime, true)

the animation is "seeked" to a time between 0 and 1.25 seconds. This method works well to control the position of any one finger. But when I apply this code for all fingers, all the animations except the last one on the queue in the AnimationPlayer loads, as soon as the scene is loaded.
In other words, assume that the AnimationPlayer has two animations: anim1 and anim2 and the queue is anim1 and then anim2. I then write a script that says AnimationPlayer.play(anim1) and attach it to a node. I write another script that says AnimationPlayer.play(anim2) and attach to another node. When the scene loads, anim1 would have already played and I can only control anim2.
I want to control anim1 and anim2 independent of each other. I have been trying for several hours on how to do that and any help is appreciated.

in Engine by (12 points)

1 Answer

0 votes

AnimationPlayer can only play one animation at a time. It doesn't queue animations. If you want to play two animations at the same time you need to use multiple AnimationPlayers.

by (7,190 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.
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.