Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kone9/1216485417d4eec95c7167b764916de8 to your computer and use it in GitHub Desktop.
Save kone9/1216485417d4eec95c7167b764916de8 to your computer and use it in GitHub Desktop.
Porting AnimationTree animations to another AnimationTree
func _ready():
for anim in $AnimationPlayer2.get_animation_list():
$AnimationPlayer.add_animation(anim, $AnimationPlayer2.get_animation(anim))
#example: running animations ported
$AnimationPlayer.connect("animation_finished", self, "rotate_anim")
$AnimationPlayer.play("test1")
func rotate_anim(anim_name):
$AnimationPlayer.play("test2")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment