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
a08760b19b
commit
a7e6578733
@ -118,8 +118,9 @@ pub fn advance_transitions(
|
|||||||
// is divided between all the other layers, eventually culminating in the
|
// is divided between all the other layers, eventually culminating in the
|
||||||
// currently-playing animation receiving whatever's left. This results in a
|
// currently-playing animation receiving whatever's left. This results in a
|
||||||
// nicely normalized weight.
|
// nicely normalized weight.
|
||||||
let mut remaining_weight = 1.0;
|
|
||||||
for (mut animation_transitions, mut player) in query.iter_mut() {
|
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() {
|
for transition in &mut animation_transitions.transitions.iter_mut().rev() {
|
||||||
// Decrease weight.
|
// Decrease weight.
|
||||||
transition.current_weight = (transition.current_weight
|
transition.current_weight = (transition.current_weight
|
||||||
|
Loading…
Reference in New Issue
Block a user