bevy icon indicating copy to clipboard operation
bevy copied to clipboard

bevy_animation `0.14` is overly restrictive.

Open mintlu8 opened this issue 1 year ago • 2 comments

What problem does this solve or what need does it fill?

  • AnimationPlayer always normalizes all weights to sum = 1, and has the invariant of "no ancestor AnimationPlayer", this makes composing animations impossible since your BodyAnimation and HandAnimation will each have 0.5 weight, when they would both want 1.0 weight to be composed.

  • AnimationTransitions does not start playing child nodes recursively, making it counterintuitive with AnimationGraph's design.

What solution would you like?

Add a lower level AnimationWeights component like HashMap<AnimationNodeIndex, f32(weight)> so users can opt out of AnimationPlayer and weight normalization by using custom logic.

What alternative(s) have you considered?

Address these issues directly in AnimationPlayer and AnimationTransitions.

mintlu8 avatar Jul 09 '24 00:07 mintlu8

AnimationPlayer always normalizes all weights to sum = 1

This should be fixed directly, or at least controlled with an option. Other users have complained about this.

AnimationTransitions does not start playing child nodes recursively, making it counterintuitive with AnimationGraph's design.

I believe this is also due for a direct fix, but I'm less confident here.

alice-i-cecile avatar Jul 09 '24 01:07 alice-i-cecile

Since the changes are likely breaking, I suggest releasing the 0.15 version ASAP as a temporary separate crate to unblock people's projects since bevy_animations is relatively independent. I personally would like to not wait another 3 months for animation changes.

mintlu8 avatar Jul 09 '24 01:07 mintlu8

Per @pcwalton, this is best tackled via adding additive blending, so I'm closing as a duplicate of #14395, which is clearer and more actionable.

alice-i-cecile avatar Sep 11 '24 01:09 alice-i-cecile