So currently I am experimenting with having characters made up of different part (feet, hands, body head) and children of a main invisible sprite.
using timelines I animated this character (walk, idle, attack)
and this is where I am running into my first issue. my idea is to be able to reuse some of these animations with different characters (made of the same body part sprites)
so i created a function, that given the UID of the main sprite would select its children and set it as the timeline instances for the given track. I tagged the timeline run for the character-uid & the animation-name (would have been easier in javascript but timeline is missing some interface functions like stop/unset)
So my first issue is animation state management, every thing almost works fine, so all of the animation are marked as relative. which means each of the body parts move relative to where they are located when the animation is played .
what happens is during the transitions the body parts might not be in the exact location relative to thier parent.
for for example during idle lets say the head bobs up and down. when the play starts walking the new origin position of the head is the head position when he started walking, this might be unnoticeable at first, but all these micro movements add up making the head be in a different relative position during the idle animation.
Okay cool, so before each new animation plays I have to stop all other timeline animations, and adjust all the body to their original relative position so when the new animation plays it plays correctly...
the stop timeline animation needs an exact name, does not accept wildcards or regular expressions, so the more animation I have the more animations I have to stop, or I need to keep track of that character's current animation, and stop it. this is doable but minor inconvenience.
setting all the body position back to the relative origin from the parent before the animation starts, this is janky. and adds undesirable stutter?
Has anyone used the timeline to achieve something similar? Am I using the timeline for something it was not designed for? should I just bake the animations in something like Spriter or Spline? if that's the case the timeline has useful features, where I can tag keyframes and make events happen or add audio that lose with the baking solution, also if have many combinations of different body parts this gets hard to manage, and using timelines is more dynamic?