+1 vote

Hey :D

Does anyony know, why the AnimationPlayer of a sprite(Sprite1) can also handle another node (Sprite2), which is a sibling to Sprite1?

Structure:
_ Root
_ _ Sprite1
_ _ _ AnimationPlayer
_ _ Sprite2

It seems, that I don't understand the concept of the AnimationPlayer.
I assume, that here in the docs lies the solution, but I don't understand it.
Could someone give other sources of explanation or break it down for me, please? :D

Godot version 3.2.1-stable_win64
in Engine by (24 points)

1 Answer

+1 vote
Best answer

An AnimationPlayer node can animate almost any property of any node, regardless of the hierarchical position in the node tree. So adding an AnimationPlayer as a child of a Sprite node doesn't make any difference.

by (288 points)
selected by

Thanks :D
So I could technically let the root be the AnimationsPlayer?

Well, you can. A good practice is to add an AnimationPlayer node as a child of the root node and add the animated nodes as children of the AnimationPlayer to easily keep track of the animated nodes.

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.