diff --git a/common/src/sys/control.rs b/common/src/sys/control.rs index 0fa60fe0d0..df1b63fc26 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::Idle + Animation::Attack } } else if gliding { Animation::Gliding diff --git a/voxygen/src/anim/character/attack.rs b/voxygen/src/anim/character/attack.rs index 91bd3d5f8b..793e19d1dc 100644 --- a/voxygen/src/anim/character/attack.rs +++ b/voxygen/src/anim/character/attack.rs @@ -68,7 +68,6 @@ impl Animation for AttackAnimation { 4.0, 9.0, ) / 11.0; - 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; @@ -101,10 +100,10 @@ impl Animation for AttackAnimation { next.r_shoulder.scale = Vec3::one() * 1.04; next.draw.offset = Vec3::new(5.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, 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 7b931ad58a..3e28bc91bd 100644 --- a/voxygen/src/anim/character/gliding.rs +++ b/voxygen/src/anim/character/gliding.rs @@ -67,6 +67,7 @@ impl Animation for GlidingAnimation { -10.0, 6.0 - wave_very_slow * 1.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; @@ -102,6 +103,7 @@ impl Animation for GlidingAnimation { 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() * 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); @@ -111,6 +113,7 @@ impl Animation for GlidingAnimation { 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); next.torso.scale = Vec3::one() / 11.0; diff --git a/voxygen/src/anim/character/idle.rs b/voxygen/src/anim/character/idle.rs index 3a42a3cc63..8805d2285d 100644 --- a/voxygen/src/anim/character/idle.rs +++ b/voxygen/src/anim/character/idle.rs @@ -59,16 +59,18 @@ impl Animation for IdleAnimation { -7.5, -2.0 + wave_ultra_slow_cos * 0.15, 8.0 + wave_ultra_slow * 0.5, - ) / 11.; + 11.5 + 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( 7.5, -2.0 + wave_ultra_slow_cos * 0.15, 8.0 + wave_ultra_slow * 0.5, - ) / 11.; + + ) / 11.0; next.r_hand.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.06); next.r_hand.scale = Vec3::one() / 11.; @@ -101,6 +103,11 @@ impl Animation for IdleAnimation { 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; + + next.torso.offset = Vec3::new(-0.5, -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 28e72c57e9..3c090a41f8 100644 --- a/voxygen/src/anim/character/jump.rs +++ b/voxygen/src/anim/character/jump.rs @@ -21,15 +21,9 @@ 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); @@ -83,6 +77,12 @@ impl Animation for JumpAnimation { 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; + + + next.torso.offset = Vec3::new(-0.5, -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/run.rs b/voxygen/src/anim/character/run.rs index 71b06d4a16..82c89e87d5 100644 --- a/voxygen/src/anim/character/run.rs +++ b/voxygen/src/anim/character/run.rs @@ -21,13 +21,7 @@ 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(); let head_look = Vec2::new( ((global_time + anim_time) as f32 / 2.0)