diff --git a/assets/models/alien_naked.glb b/assets/models/alien_naked.glb index 36d3177..4a78dc9 100644 Binary files a/assets/models/alien_naked.glb and b/assets/models/alien_naked.glb differ diff --git a/src/alien.rs b/src/alien.rs index 17a47e6..085a75b 100644 --- a/src/alien.rs +++ b/src/alien.rs @@ -21,6 +21,7 @@ fn setup( ) { // Build the animation graph let (graph, node_indices) = AnimationGraph::from_clips([ + asset_server.load(GltfAssetLabel::Animation(2).from_asset(ALIEN_ASSET_PATH)), asset_server.load(GltfAssetLabel::Animation(1).from_asset(ALIEN_ASSET_PATH)), asset_server.load(GltfAssetLabel::Animation(0).from_asset(ALIEN_ASSET_PATH)), ]); diff --git a/src/player.rs b/src/player.rs index 1099107..2a750f3 100644 --- a/src/player.rs +++ b/src/player.rs @@ -1,4 +1,5 @@ use crate::{ + alien::ALIEN_ASSET_PATH, camera::GameCameraRig, cash::{Cash, CashCollectEvent}, tb_entities::SpawnPoint, @@ -64,9 +65,17 @@ fn spawn( TnuaAvian3dSensorShape(Collider::cylinder(1.0, 0.0)), )) .with_child(( + Name::from("head"), Transform::from_translation(Vec3::new(0., 1.0, 0.)) .with_rotation(Quat::from_rotation_y(std::f32::consts::PI)), SceneRoot(mesh), + )) + .with_child(( + Name::from("body rig"), + Transform::from_translation(Vec3::new(0., -1., 0.)) + .with_rotation(Quat::from_rotation_y(std::f32::consts::PI)) + .with_scale(Vec3::splat(1.5)), + SceneRoot(asset_server.load(GltfAssetLabel::Scene(0).from_asset(ALIEN_ASSET_PATH))), )); commands.spawn(AudioPlayer::new(