mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Mixamo FBX -> glTF test
This commit is contained in:
Binary file not shown.
File diff suppressed because it is too large
Load Diff
+25
-1
@@ -59,7 +59,13 @@ impl Plugin for ScenePlugin {
|
||||
.add_systems(
|
||||
OnEnter(SceneState::Active),
|
||||
(
|
||||
(tag_scene_elements, apply_deferred, tag_skeleton).chain(),
|
||||
(
|
||||
tag_scene_elements,
|
||||
apply_deferred,
|
||||
tag_skeleton,
|
||||
play_animation,
|
||||
)
|
||||
.chain(),
|
||||
spawn_main_scene_light,
|
||||
frame_scene_in_view,
|
||||
)
|
||||
@@ -338,6 +344,24 @@ fn tag_skeleton(
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
fn play_animation(
|
||||
r_scene: Res<ActiveScene>,
|
||||
ra_gltfs: Res<Assets<Gltf>>,
|
||||
mut q_players: Query<&mut AnimationPlayer>,
|
||||
) {
|
||||
let Some(gltf) = ra_gltfs.get(&r_scene.source) else {
|
||||
return;
|
||||
};
|
||||
let Some(anim) = gltf.animations.first() else {
|
||||
return;
|
||||
};
|
||||
|
||||
for mut player in q_players.iter_mut() {
|
||||
player.play(anim.clone_weak()).repeat();
|
||||
}
|
||||
}
|
||||
|
||||
fn spawn_main_scene_light(
|
||||
mut cmd: Commands,
|
||||
r_scene_spawner: Res<SceneSpawner>,
|
||||
|
||||
Reference in New Issue
Block a user