Fix animation transitions affecting other entities (#18572)
## Objective Fix #18557. ## Solution As described in the bug, `remaining_weight` should have been inside the loop. ## Testing Locally changed the `animated_mesh_control` example to spawn multiple meshes and play different transitions.
This commit is contained in:
parent
fe3656fa8b
commit
bf915012ff
@ -118,8 +118,9 @@ pub fn advance_transitions(
|
||||
// is divided between all the other layers, eventually culminating in the
|
||||
// currently-playing animation receiving whatever's left. This results in a
|
||||
// nicely normalized weight.
|
||||
let mut remaining_weight = 1.0;
|
||||
for (mut animation_transitions, mut player) in query.iter_mut() {
|
||||
let mut remaining_weight = 1.0;
|
||||
|
||||
for transition in &mut animation_transitions.transitions.iter_mut().rev() {
|
||||
// Decrease weight.
|
||||
transition.current_weight = (transition.current_weight
|
||||
|
Loading…
Reference in New Issue
Block a user