Ive redone the animations multiple times, and now its gonna be another one.. Im tired of this.. There has to be a better way to set up nodes such as you can reuse the same animations.
The problem: When im creating animation in godot, it is tied to the node that i select, either the parent node (WeaponSlot) of a weapon where i manipulate position and rotation or the weapon scene (Weapon) itself. If it is the WeaponSlot then i have to add and animate all types on the slot, but maybe a weapon has some unique animation like a flick or something that i wan to add, then that means i have to keep the animation on the weapon scene.
The idea is to have few weapon types:
Sword
Spear
Projectile
Sword = swing
Spear = stab
Projectile = throw.
I want multiples of the same type weapons, like multiple swords, multiple spears etc.. Thus i want to reuse the animations.
Following composition convention, im thinking i could make the animation player or maybe i need animation tree as component? But then how do i animate a node that is a generic node and then later reference it on the exported value?
Right now my weapon contains information about damage it does as a Weapon
class instance, along with hitboxcomponent.
Maybe someone of you has already had this problem and has a better way to set the nodes up?