diff --git a/assets/voxygen/voxel/figure/headfemale.vox b/assets/voxygen/voxel/figure/headfemale.vox new file mode 100644 index 0000000000..b9410a8c4f --- /dev/null +++ b/assets/voxygen/voxel/figure/headfemale.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d95c29862e6e17b26193fb16bd7680e6c27c3550ae45174374e4eb5e6bc1d79 +size 5168 diff --git a/voxygen/src/anim/character/attack.rs b/voxygen/src/anim/character/attack.rs index 83f81153b8..6126fe3a45 100644 --- a/voxygen/src/anim/character/attack.rs +++ b/voxygen/src/anim/character/attack.rs @@ -47,19 +47,19 @@ impl Animation for AttackAnimation { .sin() * 0.25, ); - next.head.offset = Vec3::new(5.5, 2.0, 11.0); + next.head.offset = Vec3::new(0.0, 2.0, 11.0); next.head.ori = Quaternion::rotation_z(0.0); next.head.scale = Vec3::one(); - next.chest.offset = Vec3::new(5.5, 0.0, 7.0); + next.chest.offset = Vec3::new(0.0, 0.0, 7.0); next.chest.ori = Quaternion::rotation_x(0.0); next.chest.scale = Vec3::one(); - next.belt.offset = Vec3::new(5.5, 0.0, 5.0); + next.belt.offset = Vec3::new(0.0, 0.0, 5.0); next.belt.ori = Quaternion::rotation_x(0.0); next.belt.scale = Vec3::one(); - next.shorts.offset = Vec3::new(5.5, 0.0, 2.0); + next.shorts.offset = Vec3::new(0.0, 0.0, 2.0); next.shorts.ori = Quaternion::rotation_x(0.0); next.shorts.scale = Vec3::one(); @@ -68,8 +68,7 @@ impl Animation for AttackAnimation { 4.0, 9.0, ) / 11.0; - - next.l_hand.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.5); + next.l_hand.ori = Quaternion::rotation_x(0.0 + wave * 2.0 )* Quaternion::rotation_z(wave * 2.0); next.l_hand.scale = Vec3::one() / 11.0; next.r_hand.offset = Vec3::new( @@ -88,29 +87,31 @@ impl Animation for AttackAnimation { next.r_foot.ori = Quaternion::identity(); next.r_foot.scale = Vec3::one(); - next.weapon.offset = Vec3::new(-12.0, -2.0, 11.0); + next.weapon.offset = Vec3::new(-7.0, -5.0, 15.0); next.weapon.ori = Quaternion::rotation_y(2.5); next.weapon.scale = Vec3::one(); - next.l_shoulder.offset = Vec3::new(-10.0, -3.0, 2.5); + next.l_shoulder.offset = Vec3::new(-10.0, -3.2, 2.5); next.l_shoulder.ori = Quaternion::rotation_x(0.0); - next.l_shoulder.scale = Vec3::one(); + next.l_shoulder.scale = Vec3::one() * 1.04; - next.r_shoulder.offset = Vec3::new(0.0, -3.0, 2.5); + next.r_shoulder.offset = Vec3::new(0.0, -3.2, 2.5); next.r_shoulder.ori = Quaternion::rotation_x(0.0); - next.r_shoulder.scale = Vec3::one(); + next.r_shoulder.scale = Vec3::one() * 1.04; - next.draw.offset = Vec3::new(13.5, 0.0, 0.0); + next.draw.offset = Vec3::new(0.0, 5.0, 0.0); next.draw.ori = Quaternion::rotation_y(0.0); next.draw.scale = Vec3::one() * 0.0; - - next.left_equip.offset = Vec3::new(-8.0, 4.0, 10.0) / 13.0; - next.left_equip.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.5) * Quaternion::rotation_z(1.57); + next.left_equip.offset = Vec3::new(-8.0, 4.0, 9.0) / 11.0; + next.left_equip.ori = Quaternion::rotation_x(0.0 + wave * 2.0)* Quaternion::rotation_z(1.57 + wave * 2.0); next.left_equip.scale = Vec3::one() / 11.0; - - next.torso.offset = Vec3::new(-0.5, -0.2, 0.1); + next.right_equip.offset = Vec3::new(0.0, 0.0, 5.0) / 11.0; + next.right_equip.ori = Quaternion::rotation_x(0.0);; + next.right_equip.scale = Vec3::one() * 0.0; + + next.torso.offset = Vec3::new(0.0, -0.2, 0.1); next.torso.ori = Quaternion::rotation_x(0.0); next.torso.scale = Vec3::one() / 11.0; next diff --git a/voxygen/src/anim/character/gliding.rs b/voxygen/src/anim/character/gliding.rs index 9319c57a3b..2834657832 100644 --- a/voxygen/src/anim/character/gliding.rs +++ b/voxygen/src/anim/character/gliding.rs @@ -46,27 +46,28 @@ impl Animation for GlidingAnimation { .sin() * 0.25, ); - next.head.offset = Vec3::new(5.5, 2.0, 12.0); + next.head.offset = Vec3::new(0.0, 2.0, 12.0); next.head.ori = Quaternion::rotation_x(0.35 - wave_very_slow * 0.10 + head_look.y) * Quaternion::rotation_z(head_look.x + wave_very_slow_cos * 0.15); next.head.scale = Vec3::one(); - next.chest.offset = Vec3::new(5.5, 0.0, 8.0); + next.chest.offset = Vec3::new(0.0, 0.0, 8.0); next.chest.ori = Quaternion::rotation_z(wave_very_slow_cos * 0.15); next.chest.scale = Vec3::one(); - next.belt.offset = Vec3::new(5.5, 0.0, 6.0); + next.belt.offset = Vec3::new(0.0, 0.0, 6.0); next.belt.ori = Quaternion::rotation_z(wave_very_slow_cos * 0.20); next.belt.scale = Vec3::one(); - next.shorts.offset = Vec3::new(5.5, 0.0, 3.0); + next.shorts.offset = Vec3::new(0.0, 0.0, 3.0); next.shorts.ori = Quaternion::rotation_z(wave_very_slow_cos * 0.25); next.shorts.scale = Vec3::one(); next.l_hand.offset = Vec3::new( -10.0, 6.0 - wave_very_slow * 1.50, - 15.0 + wave_very_slow * 0.50, + 15.0 + wave_very_slow * 0.50, + ) / 11.0; next.l_hand.ori = Quaternion::rotation_x(0.2 + wave_very_slow_cos * 0.05); next.l_hand.scale = Vec3::one() / 11.0; @@ -91,24 +92,32 @@ impl Animation for GlidingAnimation { ); next.r_foot.scale = Vec3::one(); - next.weapon.offset = Vec3::new(-5.0, -5.0, 12.0); + next.weapon.offset = Vec3::new(-7.0, -5.0, 15.0); next.weapon.ori = Quaternion::rotation_y(2.5); next.weapon.scale = Vec3::one(); - next.l_shoulder.offset = Vec3::new(-10.0, -3.0, 2.5); + next.l_shoulder.offset = Vec3::new(-10.0, -3.2, 2.5); next.l_shoulder.ori = Quaternion::rotation_x(0.0); - next.l_shoulder.scale = Vec3::one(); + next.l_shoulder.scale = Vec3::one() * 1.04; - next.r_shoulder.offset = Vec3::new(0.0, -3.0, 2.5); + next.r_shoulder.offset = Vec3::new(0.0, -3.2, 2.5); next.r_shoulder.ori = Quaternion::rotation_x(0.0); - next.r_shoulder.scale = Vec3::one(); + next.r_shoulder.scale = Vec3::one() * 1.04; + - next.draw.offset = Vec3::new(5.5, -9.0 + wave_very_slow * 0.10, 18.0); + next.draw.offset = Vec3::new(0.0, -9.0 + wave_very_slow * 0.10, 18.0); next.draw.ori = Quaternion::rotation_x(0.95 - wave_very_slow * 0.15) * Quaternion::rotation_y(wave_very_slow_cos * 0.04); next.draw.scale = Vec3::one(); + next.left_equip.offset = Vec3::new(0.0, 0.0, 5.0) / 11.0; + next.left_equip.ori = Quaternion::rotation_x(0.0);; + next.left_equip.scale = Vec3::one() *0.0; + + next.right_equip.offset = Vec3::new(0.0, 0.0, 5.0) / 11.0; + next.right_equip.ori = Quaternion::rotation_x(0.0);; + next.right_equip.scale = Vec3::one() * 0.0; - next.torso.offset = Vec3::new(-0.5, -0.2, 0.0); + next.torso.offset = Vec3::new(0.0, -0.2, 0.0); next.torso.ori = Quaternion::rotation_x(-0.8 + wave_very_slow * 0.10); next.torso.scale = Vec3::one() / 11.0; diff --git a/voxygen/src/anim/character/idle.rs b/voxygen/src/anim/character/idle.rs index aac4e46703..acf5a67596 100644 --- a/voxygen/src/anim/character/idle.rs +++ b/voxygen/src/anim/character/idle.rs @@ -23,13 +23,9 @@ impl Animation for IdleAnimation { ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - let wave = (anim_time as f32 * 12.0).sin(); - let wave_cos = (anim_time as f32 * 12.0).cos(); - let wave_slow = (anim_time as f32 * 6.0 + PI).sin(); - let wave_slow_cos = (anim_time as f32 * 6.0 + PI).cos(); let wave_ultra_slow = (anim_time as f32 * 1.0 + PI).sin(); let wave_ultra_slow_cos = (anim_time as f32 * 1.0 + PI).cos(); - let wave_dip = (wave_slow.abs() - 0.5).abs(); + let head_look = Vec2::new( ((global_time + anim_time) as f32 / 8.0) @@ -43,65 +39,73 @@ impl Animation for IdleAnimation { .sin() * 0.25, ); - next.head.offset = Vec3::new(5.5, 2.0, 11.0 + wave_ultra_slow * 0.3); + next.head.offset = Vec3::new(0.0, 2.0, 11.0 + wave_ultra_slow * 0.3); next.head.ori = Quaternion::rotation_z(head_look.x) * Quaternion::rotation_x(head_look.y); next.head.scale = Vec3::one(); - next.chest.offset = Vec3::new(5.5, 0.0, 7.0 + wave_ultra_slow * 0.3); + next.chest.offset = Vec3::new(0.0, 0.0, 7.0 + wave_ultra_slow * 0.3); next.chest.ori = Quaternion::rotation_x(0.0); next.chest.scale = Vec3::one(); - next.belt.offset = Vec3::new(5.5, 0.0, 5.0 + wave_ultra_slow * 0.3); + next.belt.offset = Vec3::new(0.0, 0.0, 5.0 + wave_ultra_slow * 0.3); next.belt.ori = Quaternion::rotation_x(0.0); next.belt.scale = Vec3::one(); - next.shorts.offset = Vec3::new(5.5, 0.0, 2.0 + wave_ultra_slow * 0.3); + next.shorts.offset = Vec3::new(0.0, 0.0, 2.0 + wave_ultra_slow * 0.3); next.shorts.ori = Quaternion::rotation_x(0.0); next.shorts.scale = Vec3::one(); next.l_hand.offset = Vec3::new( - -6.0, + -7.5, -2.0 + wave_ultra_slow_cos * 0.15, - 11.5 + wave_ultra_slow * 0.5, - ) / 11.; + 8.0 + wave_ultra_slow * 0.5, + ) / 11.0; next.l_hand.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.06); - next.l_hand.scale = Vec3::one() / 11.; + next.l_hand.scale = Vec3::one() / 11.0; next.r_hand.offset = Vec3::new( - 9.0, + 7.5, -2.0 + wave_ultra_slow_cos * 0.15, - 11.5 + wave_ultra_slow * 0.5, - ) / 11.; + 8.0 + wave_ultra_slow * 0.5, + + ) / 11.0; next.r_hand.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.06); next.r_hand.scale = Vec3::one() / 11.; - next.l_foot.offset = Vec3::new(-3.3, -0.1, 8.0); + next.l_foot.offset = Vec3::new(-3.4, -0.1, 8.0); next.l_foot.ori = Quaternion::identity(); next.l_foot.scale = Vec3::one(); - next.r_foot.offset = Vec3::new(4.1, -0.1, 8.0); + next.r_foot.offset = Vec3::new(3.4, -0.1, 8.0); next.r_foot.ori = Quaternion::identity(); next.r_foot.scale = Vec3::one(); - next.weapon.offset = Vec3::new(-5.0, -5.0, 12.0); + next.weapon.offset = Vec3::new(-7.0, -5.0, 15.0); next.weapon.ori = Quaternion::rotation_y(2.5); next.weapon.scale = Vec3::one(); - next.l_shoulder.offset = Vec3::new(-10.0, -3.0, 2.5); + next.l_shoulder.offset = Vec3::new(-10.0, -3.2, 2.5); next.l_shoulder.ori = Quaternion::rotation_x(0.0); - next.l_shoulder.scale = Vec3::one(); + next.l_shoulder.scale = Vec3::one() * 1.04; - next.r_shoulder.offset = Vec3::new(0.0, -3.0, 2.5); + next.r_shoulder.offset = Vec3::new(0.0, -3.2, 2.5); next.r_shoulder.ori = Quaternion::rotation_x(0.0); - next.r_shoulder.scale = Vec3::one(); + next.r_shoulder.scale = Vec3::one() * 1.04; - next.draw.offset = Vec3::new(13.5, 0.0, 0.0); + next.draw.offset = Vec3::new(0.0, 5.0, 0.0); next.draw.ori = Quaternion::rotation_y(0.0); next.draw.scale = Vec3::one() * 0.0; - - next.torso.offset = Vec3::new(-0.5, -0.2, 0.1); + next.left_equip.offset = Vec3::new(0.0, 0.0, 5.0) / 11.0; + next.left_equip.ori = Quaternion::rotation_x(0.0);; + next.left_equip.scale = Vec3::one() * 0.0; + + next.right_equip.offset = Vec3::new(0.0, 0.0, 5.0) / 11.0; + next.right_equip.ori = Quaternion::rotation_x(0.0);; + next.right_equip.scale = Vec3::one() * 0.0; + + next.torso.offset = Vec3::new(0.0, -0.2, 0.1); next.torso.ori = Quaternion::rotation_x(0.0); next.torso.scale = Vec3::one() / 11.0; diff --git a/voxygen/src/anim/character/jump.rs b/voxygen/src/anim/character/jump.rs index 4536b8165c..f1e9c943ca 100644 --- a/voxygen/src/anim/character/jump.rs +++ b/voxygen/src/anim/character/jump.rs @@ -21,37 +21,31 @@ impl Animation for JumpAnimation { let mut next = (*skeleton).clone(); let wave = (anim_time as f32 * 14.0).sin(); let wave_slow = (anim_time as f32 * 7.0).sin(); - let arc_wave = (1.0f32.ln_1p() - 1.5).abs(); - let wave_test = (wave.cbrt()); - let fuzz_wave = (anim_time as f32 * 12.0).sin(); - let wave_cos = (anim_time as f32 * 14.0).cos(); let wave_stop = (anim_time as f32 * 4.5).min(PI / 2.0).sin(); let wave_stop_alt = (anim_time as f32 * 5.0).min(PI / 2.0).sin(); - let wave_slow_test = (anim_time as f32).min(PI / 2.0).sin(); - let wave_slow_cos = (anim_time as f32 * 8.0 + PI).cos(); - next.head.offset = Vec3::new(5.5, 2.0, 12.0); - next.head.ori = Quaternion::rotation_x(0.25); + next.head.offset = Vec3::new(0.0, 3.0, 13.0); + next.head.ori = Quaternion::rotation_x(0.25 + wave_stop * 0.1 + wave_slow * 0.04); next.head.scale = Vec3::one(); - next.chest.offset = Vec3::new(5.5, 0.0, 8.0); + next.chest.offset = Vec3::new(0.0, 0.0, 8.0); next.chest.ori = Quaternion::rotation_z(0.0); next.chest.scale = Vec3::one(); - next.belt.offset = Vec3::new(5.5, 0.0, 6.0); + next.belt.offset = Vec3::new(0.0, 0.0, 6.0); next.belt.ori = Quaternion::rotation_z(0.0); next.belt.scale = Vec3::one(); - next.shorts.offset = Vec3::new(5.5, 0.0, 3.0); + next.shorts.offset = Vec3::new(0.0, 0.0, 3.0); next.shorts.ori = Quaternion::rotation_z(0.0); next.shorts.scale = Vec3::one(); - next.l_hand.offset = Vec3::new(-8.0, 0.0 + wave_stop * 3.2, 7.0 + wave_stop * 3.2 -wave * 0.3) / 11.0; + next.l_hand.offset = Vec3::new(-8.0, 0.0 + wave_stop * 3.8, 7.0 + wave_stop * 3.2 -wave * 0.4) / 11.0; next.l_hand.ori = Quaternion::rotation_x(wave_stop_alt * 0.6); next.l_hand.scale = Vec3::one() / 11.0; - next.r_hand.offset = Vec3::new(8.0, 0.0 + wave_stop * -3.2, 7.0 + wave_stop * 3.2 - wave * 0.3) / 11.0; + next.r_hand.offset = Vec3::new(8.0, 0.0 + wave_stop * -3.8, 7.0 + wave_stop * 3.2 - wave * 0.4) / 11.0; next.r_hand.ori = Quaternion::rotation_x(-wave_stop_alt * 0.6); next.r_hand.scale = Vec3::one() / 11.0; @@ -63,25 +57,31 @@ impl Animation for JumpAnimation { next.r_foot.ori = Quaternion::rotation_x(wave_stop * 1.2 + wave_slow * 0.2); next.r_foot.scale = Vec3::one(); - next.weapon.offset = Vec3::new(-5.0, -5.0, 12.0); + next.weapon.offset = Vec3::new(-7.0, -5.0, 15.0); next.weapon.ori = Quaternion::rotation_y(2.5); next.weapon.scale = Vec3::one(); - next.l_shoulder.offset = Vec3::new(-10.0, -3.0, 2.5); + next.l_shoulder.offset = Vec3::new(-10.0, -3.2, 2.5); next.l_shoulder.ori = Quaternion::rotation_x(0.0); - next.l_shoulder.scale = Vec3::one(); + next.l_shoulder.scale = Vec3::one() * 1.04; - next.r_shoulder.offset = Vec3::new(0.0, -3.0, 2.5); + next.r_shoulder.offset = Vec3::new(0.0, -3.2, 2.5); next.r_shoulder.ori = Quaternion::rotation_x(0.0); - next.r_shoulder.scale = Vec3::one(); + next.r_shoulder.scale = Vec3::one() * 1.04; - next.draw.offset = Vec3::new(13.5, 0.0, 0.0); + next.draw.offset = Vec3::new(0.0, 5.0, 0.0); next.draw.ori = Quaternion::rotation_y(0.0); next.draw.scale = Vec3::one() * 0.0; + next.left_equip.offset = Vec3::new(0.0, 0.0, 5.0) / 11.0; + next.left_equip.ori = Quaternion::rotation_x(0.0);; + next.left_equip.scale = Vec3::one() *0.0; + next.right_equip.offset = Vec3::new(0.0, 0.0, 5.0) / 11.0; + next.right_equip.ori = Quaternion::rotation_x(0.0);; + next.right_equip.scale = Vec3::one() * 0.0; - next.torso.offset = Vec3::new(-0.5, -0.2, 0.0); + next.torso.offset = Vec3::new(0.0, -0.2, 0.0); next.torso.ori = Quaternion::rotation_x(-0.2); next.torso.scale = Vec3::one() / 11.0; diff --git a/voxygen/src/anim/character/mod.rs b/voxygen/src/anim/character/mod.rs index 6738970965..d6713d907b 100644 --- a/voxygen/src/anim/character/mod.rs +++ b/voxygen/src/anim/character/mod.rs @@ -34,6 +34,7 @@ pub struct CharacterSkeleton { r_shoulder: Bone, draw: Bone, left_equip: Bone, + right_equip: Bone, torso: Bone, } @@ -53,6 +54,7 @@ impl CharacterSkeleton { r_shoulder: Bone::default(), draw: Bone::default(), left_equip: Bone::default(), + right_equip: Bone::default(), torso: Bone::default(), } } @@ -78,9 +80,9 @@ impl Skeleton for CharacterSkeleton { FigureBoneData::new(torso_mat * chest_mat * self.r_shoulder.compute_base_matrix()), FigureBoneData::new(torso_mat * self.draw.compute_base_matrix()), FigureBoneData::new(self.left_equip.compute_base_matrix()), + FigureBoneData::new(self.right_equip.compute_base_matrix()), FigureBoneData::new(torso_mat), FigureBoneData::default(), - FigureBoneData::default(), ] @@ -100,6 +102,7 @@ impl Skeleton for CharacterSkeleton { self.r_shoulder.interpolate(&target.r_shoulder); self.draw.interpolate(&target.draw); self.left_equip.interpolate(&target.left_equip); + self.right_equip.interpolate(&target.right_equip); self.torso.interpolate(&target.torso); } } diff --git a/voxygen/src/anim/character/run.rs b/voxygen/src/anim/character/run.rs index 0a2b71e283..d8292286c4 100644 --- a/voxygen/src/anim/character/run.rs +++ b/voxygen/src/anim/character/run.rs @@ -1,5 +1,5 @@ // Standard -use std::f32::consts::PI; +use std::{f32::consts::PI, ops::Mul}; // Library use vek::*; @@ -21,36 +21,43 @@ impl Animation for RunAnimation { let mut next = (*skeleton).clone(); let wave = (anim_time as f32 * 14.0).sin(); - let wave_test = (wave.cbrt()); - let fuzz_wave = (anim_time as f32 * 12.0).sin(); let wave_cos = (anim_time as f32 * 14.0).cos(); - let wave_cosdouble = (anim_time as f32 * 28.0).cos(); - let wave_slow = (anim_time as f32 * 7.0 + PI).sin(); - let wave_slow_cos = (anim_time as f32 * 8.0 + PI).cos(); - let wave_dip = (wave_slow.abs() - 0.5).abs(); - next.head.offset = Vec3::new(5.5, 2.0, 11.0 + wave_cos * 1.3); - next.head.ori = Quaternion::rotation_x(0.15); + let head_look = Vec2::new( + ((global_time + anim_time) as f32 / 2.0) + .floor() + .mul(7331.0) + .sin() + * 0.2, + ((global_time + anim_time) as f32 / 2.0) + .floor() + .mul(1337.0) + .sin() + * 0.1, + ); + + next.head.offset = Vec3::new(0.0, 3.0, 12.0 + wave_cos * 1.3); + next.head.ori = Quaternion::rotation_z(head_look.x) * Quaternion::rotation_x(head_look.y + 0.35); next.head.scale = Vec3::one(); - next.chest.offset = Vec3::new(5.5, 0.0, 7.0 + wave_cos * 1.1); + next.chest.offset = Vec3::new(0.0, 0.0, 7.0 + wave_cos * 1.1); next.chest.ori = Quaternion::rotation_z(wave * 0.1); next.chest.scale = Vec3::one(); - next.belt.offset = Vec3::new(5.5, 0.0, 5.0 + wave_cos * 1.1); + next.belt.offset = Vec3::new(0.0, 0.0, 5.0 + wave_cos * 1.1); next.belt.ori = Quaternion::rotation_z(wave * 0.25); next.belt.scale = Vec3::one(); - next.shorts.offset = Vec3::new(5.5, 0.0, 2.0 + wave_cos * 1.1); + next.shorts.offset = Vec3::new(0.0, 0.0, 2.0 + wave_cos * 1.1); next.shorts.ori = Quaternion::rotation_z(wave * 0.6); next.shorts.scale = Vec3::one(); next.l_hand.offset = Vec3::new(-8.0, 3.0 + wave_cos * 5.0, 9.0 - wave * 2.0) / 11.0; - next.l_hand.ori = Quaternion::rotation_x(wave_cos * 0.9); + next.l_hand.ori = Quaternion::rotation_x(wave_cos * 1.1); next.l_hand.scale = Vec3::one() / 11.0; next.r_hand.offset = Vec3::new(8.0, 3.0 - wave_cos * 5.0, 9.0 + wave * 2.0) / 11.0; - next.r_hand.ori = Quaternion::rotation_x(wave_cos * -0.9); + next.r_hand.ori = Quaternion::rotation_x(wave_cos * -1.1); next.r_hand.scale = Vec3::one() / 11.0; next.l_foot.offset = Vec3::new(-3.4, 0.0 + wave * 1.0, 6.0); @@ -61,26 +68,35 @@ impl Animation for RunAnimation { next.r_foot.ori = Quaternion::rotation_x(-0.0 + wave * 1.5); next.r_foot.scale = Vec3::one(); - next.weapon.offset = Vec3::new(-5.0, -5.0, 12.0); + next.weapon.offset = Vec3::new(-7.0, -5.0, 15.0); next.weapon.ori = Quaternion::rotation_y(2.5); next.weapon.scale = Vec3::one(); - next.l_shoulder.offset = Vec3::new(-10.0, -3.0, 2.5); + next.l_shoulder.offset = Vec3::new(-10.0, -3.2, 2.5); next.l_shoulder.ori = Quaternion::rotation_x(0.0); - next.l_shoulder.scale = Vec3::one(); + next.l_shoulder.scale = Vec3::one() * 1.04; - next.r_shoulder.offset = Vec3::new(0.0, -3.0, 2.5); + next.r_shoulder.offset = Vec3::new(0.0, -3.2, 2.5); next.r_shoulder.ori = Quaternion::rotation_x(0.0); - next.r_shoulder.scale = Vec3::one(); + next.r_shoulder.scale = Vec3::one() * 1.04; - next.torso.offset = Vec3::new(-0.5, -0.2, 0.4); - next.torso.ori = Quaternion::rotation_x(-velocity * 0.05 - wave_cos * 0.1); - next.torso.scale = Vec3::one() / 11.0; - - next.draw.offset = Vec3::new(13.5, 0.0, 0.0); + next.draw.offset = Vec3::new(0.0, 5.0, 0.0); next.draw.ori = Quaternion::rotation_y(0.0); next.draw.scale = Vec3::one() * 0.0; + next.left_equip.offset = Vec3::new(0.0, 0.0, 5.0) / 11.0; + next.left_equip.ori = Quaternion::rotation_x(0.0);; + next.left_equip.scale = Vec3::one() * 0.0; + + next.right_equip.offset = Vec3::new(0.0, 0.0, 5.0) / 11.0; + next.right_equip.ori = Quaternion::rotation_x(0.0);; + next.right_equip.scale = Vec3::one() * 0.0; + + next.torso.offset = Vec3::new(0.0, -0.2, 0.4); + next.torso.ori = Quaternion::rotation_x(-velocity * 0.04 - wave_cos * 0.10); + next.torso.scale = Vec3::one() / 11.0; + + next } diff --git a/voxygen/src/scene/figure.rs b/voxygen/src/scene/figure.rs index 911ae52f35..1205c0934b 100644 --- a/voxygen/src/scene/figure.rs +++ b/voxygen/src/scene/figure.rs @@ -69,8 +69,13 @@ impl FigureModelCache { Some(Self::load_left_shoulder(body.shoulder)), Some(Self::load_right_shoulder(body.shoulder)), Some(Self::load_draw(body.draw)), +<<<<<<< HEAD Some(Self::load_left_equip(body.weapon)), None, +======= + Some(Self::load_left_hold(body.hand)), + Some(Self::load_right_hold(body.hand)), +>>>>>>> attack state None, None, ], @@ -263,6 +268,14 @@ impl FigureModelCache { ) } + fn load_right_equip(hand: Hand) -> Mesh { + Self::load_mesh( + match hand { + Hand::Default => "figure/body/hand.vox", + }, + Vec3::new(-2.0, -2.5, -2.0), + ) + } fn load_pig_head(pig_head: PigHead) -> Mesh {