Best way to categorize player 2D animations?

Godot Version

4.5

Question

I have a player Scene with a Sprite2D note, an AnimationPlayer and an AnimationTree. I wanted to set up four idle and four walk animations; up, down, left and right for each, to then use in the AnimationTree. However I think having one animation player with 8 animations called things like walk_left, walk_right, idle_left, idle_right, etc., seems tediously confusing, especially when eventually more will be added.

At first I thought I’d just make two different AnimationPlayers for each, one called walk and one called idle, with the animations left, right, up and down for each, however then I realized I can only load one AnimationPlayer into the AnimationTree, so that doesn’t seem ideal.

So then I read up a bit about AnimationLibraries within the AnimationPlayer and thought that seemed like what I’m looking for. So currently I have an AnimationPlayer with two libraries: one called walk and one called idle, each with the four animations. However as I set up the animations for the second library… I noticed it affects the identically called animation in the first library as well!

So if I edit idle/up, the animation set up in walk/up also gets edited to be identicle to idle/up. Obviously not what I want!

Is there any way to achieve what I’m looking for!? I seriously thought the AnimationLibraries were for that, I’m so confused on what their purpose is now that they just seem to be identical to each other :frowning:

Maybe your animation libraries ended up pointing to the same resource, did you create two separate resource files in the Filesystem panel, and then assign them?

1 Like

They’re both marked as [built-in], however, I DID load one in from an external source, and then on that library pressed “Make unique” (I believe thats what it was called) which then changed the storage source from the file I loaded to [built-in].

I’m not sure why that would make them treat them as identical to the other libraries animations after that, but I believe something about that process was what ended up causing it. If I now delete those and create new animations, with the exact identical name and the [built-in] as storage source, the issue no longer persists… weird :thinking:

Godot very aggressively shares resources, it’s a great help where wanted; even built-in resources can be shared (within the scene) but they can cause some strange behavior in-editor.

1 Like