Do I have to have different scene for each animation ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By amaou310

Hello people. Im very new to Godot Engine.
And, let me apologies for the bad grammar in advance, cuz Im not native speaker.

I was trying to make various animation such as idle and chasing animation by the keyframe animation in animation-player. The problem is that, the position of some sprites seems to be reset every time when I change the animation from the animation list tab.

Does that mean I can’t make multiple animation in just one scene? Or, is there any way to have multiple animation in one scene?

can you add an example

ramazan | 2022-02-04 08:42

:bust_in_silhouette: Reply From: Zylann

You can have multiple animations in one scene. But an animation cannot “start from where another left off”. When you start an animation, each animated property will always start to the value set in that animation. Is that what you mean when you say it “resets” the position of some sprites?

If that means you’d have to make an animation for every combination of situations you want to handle, maybe another approach is to split the animation player so that you can compose the parts of the animation by playing two, each animating independent parts (but not sure if you actually need that).

Also, usually animations should not modify the position of the root node. for example with characters they are moved by script so animations shouldn’t override that.

If you still don’t know maybe you should provide a detailed example of what your problem is.