diff --git a/common/src/sys/control.rs b/common/src/sys/control.rs index df1b63fc26..0fa60fe0d0 100644 --- a/common/src/sys/control.rs +++ b/common/src/sys/control.rs @@ -86,7 +86,7 @@ impl<'a> System<'a> for Sys { if control.move_dir.magnitude() > 0.01 { Animation::Run } else { - Animation::Attack + Animation::Idle } } else if gliding { Animation::Gliding diff --git a/voxygen/src/anim/character/attack.rs b/voxygen/src/anim/character/attack.rs index 83f81153b8..22a95f94fb 100644 --- a/voxygen/src/anim/character/attack.rs +++ b/voxygen/src/anim/character/attack.rs @@ -69,7 +69,7 @@ impl Animation for AttackAnimation { 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,25 +88,25 @@ 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(-9.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.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.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.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; diff --git a/voxygen/src/anim/character/gliding.rs b/voxygen/src/anim/character/gliding.rs index 9319c57a3b..5fd13171e6 100644 --- a/voxygen/src/anim/character/gliding.rs +++ b/voxygen/src/anim/character/gliding.rs @@ -66,7 +66,7 @@ impl Animation for GlidingAnimation { 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,22 +91,25 @@ 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(-9.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.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.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.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.torso.offset = Vec3::new(-0.5, -0.2, 0.0); next.torso.ori = Quaternion::rotation_x(-0.8 + wave_very_slow * 0.10); diff --git a/voxygen/src/anim/character/idle.rs b/voxygen/src/anim/character/idle.rs index aac4e46703..725c7f70f6 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) @@ -60,18 +56,18 @@ impl Animation for IdleAnimation { 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, + 8.0 + wave_ultra_slow * 0.5, ) / 11.; next.l_hand.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.06); next.l_hand.scale = Vec3::one() / 11.; 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, + 8.0 + wave_ultra_slow * 0.5, ) / 11.; next.r_hand.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.06); next.r_hand.scale = Vec3::one() / 11.; @@ -84,21 +80,25 @@ impl Animation for IdleAnimation { 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(-9.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.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.torso.offset = Vec3::new(-0.5, -0.2, 0.1); diff --git a/voxygen/src/anim/character/jump.rs b/voxygen/src/anim/character/jump.rs index 4536b8165c..b5790ec530 100644 --- a/voxygen/src/anim/character/jump.rs +++ b/voxygen/src/anim/character/jump.rs @@ -47,11 +47,11 @@ impl Animation for JumpAnimation { 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,23 +63,25 @@ 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(-9.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.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.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.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.torso.offset = Vec3::new(-0.5, -0.2, 0.0); next.torso.ori = Quaternion::rotation_x(-0.2); diff --git a/voxygen/src/anim/character/run.rs b/voxygen/src/anim/character/run.rs index 0a2b71e283..3db351b66e 100644 --- a/voxygen/src/anim/character/run.rs +++ b/voxygen/src/anim/character/run.rs @@ -46,11 +46,11 @@ impl Animation for RunAnimation { 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,22 +61,26 @@ 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(-9.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.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.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.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.draw.offset = Vec3::new(13.5, 0.0, 0.0); next.draw.ori = Quaternion::rotation_y(0.0); next.draw.scale = Vec3::one() * 0.0;