Open NancokPS2 opened 8 months ago
@NancokPS2 do you know an example of this tween approach?
I had started a PR to implement that translatetion from AnimationPlayer's keys to tweens, but it proved to be pretty convoluted and complex. Very much doable, but it would need a very robust system.
Another method is to create pre-defined animations (with an AnimationPlayer, since animations are their own Resource) paired with a script that adapts the animations so they can be used as a component (slap it on whatever, set the @export variables and watch it go). But it would provide little benefit (if at all) over creating the AnimationPlayer's manually for each scene and ensuring the node names remain the same.
One i had considered was splitting this into several classes under a singleton dedicated to visual effects.
All in all, animations can be done with any mix of Tweens and AnimationPlayers
To use simultaneous animations, we either need an AnimationTree or have Tweens replace the functionality of the AnimationPlayer.
For the former, it would keep things mostly the same, but AnimationTree requires quite a bit of manual work + code work.
For the later, the Tweens can simply translate the animations from the AnimationPlayer to their own Tween, that way we can still use AnimationPlayer to create animations instead of relying on code to make them.
If everything works fine, this approach will use a component that is attached to the AnimationPlayer and merely gives it the ability to run several animations simultaneously.