Skip to content

Commit

Permalink
fix morph weights
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Feb 9, 2024
1 parent 13e46d7 commit c88f904
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_animation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ pub fn advance_animations(
/// according to the currently-playing animation.
pub fn animate_targets(
clips: Res<Assets<AnimationClip>>,
players: Query<&AnimationPlayer, Without<AnimationTarget>>,
players: Query<&AnimationPlayer>,
mut targets: Query<(
Entity,
&AnimationTarget,
Expand Down
7 changes: 6 additions & 1 deletion crates/bevy_gltf/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,10 +952,15 @@ fn load_node(
None => {
if animation_roots.contains(&gltf_node.index()) {
// This is an animation root. Make a new animation context.
animation_context = Some(AnimationContext {
let new_animation_context = AnimationContext {
root: node.id(),
path: smallvec![name],
};
node.insert(AnimationTarget {
id: AnimationTargetId::from_names(new_animation_context.path.iter()),
player: new_animation_context.root,
});
animation_context = Some(new_animation_context)
}
}
Some(ref mut animation_context) => {
Expand Down

0 comments on commit c88f904

Please sign in to comment.