diff --git a/assets/voxygen/voxel/armor/lantern/black-0.vox b/assets/voxygen/voxel/armor/lantern/black-0.vox new file mode 100644 index 0000000000..59c8048ed2 Binary files /dev/null and b/assets/voxygen/voxel/armor/lantern/black-0.vox differ diff --git a/assets/voxygen/voxel/armor/lantern/green-0.vox b/assets/voxygen/voxel/armor/lantern/green-0.vox new file mode 100644 index 0000000000..fc456440ed Binary files /dev/null and b/assets/voxygen/voxel/armor/lantern/green-0.vox differ diff --git a/assets/voxygen/voxel/humanoid_lantern_manifest.ron b/assets/voxygen/voxel/humanoid_lantern_manifest.ron index 2eab34212a..2ad5c02a5b 100644 --- a/assets/voxygen/voxel/humanoid_lantern_manifest.ron +++ b/assets/voxygen/voxel/humanoid_lantern_manifest.ron @@ -5,11 +5,11 @@ ), map: { Green0: ( - vox_spec: ("lantern.green-0", (0.0, 0.0, 0.0)), + vox_spec: ("armor.lantern.green-0", (-2.0, -2.0, -7.0)), color: None ), Black0: ( - vox_spec: ("lantern.black-0", (0.0, 0.0, 0.0)), + vox_spec: ("armor.lantern.black-0", (-2.0, -2.0, -7.0)), color: None ), }, diff --git a/voxygen/src/anim/character/alpha.rs b/voxygen/src/anim/character/alpha.rs index 74573fc146..fc09deca0c 100644 --- a/voxygen/src/anim/character/alpha.rs +++ b/voxygen/src/anim/character/alpha.rs @@ -104,6 +104,10 @@ impl Animation for AlphaAnimation { next.r_foot.ori = Quaternion::rotation_x(slow * -0.6) * Quaternion::rotation_y((slow * 0.2).min(0.0)); next.r_foot.scale = Vec3::one(); + + next.lantern.ori = + Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4); + next.torso.offset = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler; next.torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0) @@ -151,6 +155,9 @@ impl Animation for AlphaAnimation { * Quaternion::rotation_z(-0.8); next.main.scale = Vec3::one(); + next.lantern.ori = Quaternion::rotation_x(slowax * -0.7 + 0.4) + * Quaternion::rotation_y(slowax * 0.4); + next.control.offset = Vec3::new(0.0, 0.0 + slowax * 8.2, 6.0); next.control.ori = Quaternion::rotation_x(0.8) * Quaternion::rotation_y(-0.3) @@ -197,6 +204,10 @@ impl Animation for AlphaAnimation { next.shorts.offset = Vec3::new(0.0, 0.0, -5.0); next.shorts.ori = next.chest.ori * -0.15; next.shorts.scale = Vec3::one(); + + next.lantern.ori = Quaternion::rotation_x(slower * -0.7 + 0.4) + * Quaternion::rotation_y(slower * 0.4); + next.torso.offset = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler; next.torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0) @@ -519,6 +530,8 @@ impl Animation for AlphaAnimation { }, _ => {}, } + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.scale = Vec3::one() * 0.65; next.l_shoulder.offset = Vec3::new(-5.0, 0.0, 4.7); next.l_shoulder.ori = Quaternion::rotation_x(0.0); @@ -532,10 +545,6 @@ impl Animation for AlphaAnimation { next.glider.ori = Quaternion::rotation_y(0.0); next.glider.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; - next.l_control.offset = Vec3::new(0.0, 0.0, 0.0); next.l_control.ori = Quaternion::rotation_x(0.0); next.l_control.scale = Vec3::one(); diff --git a/voxygen/src/anim/character/beta.rs b/voxygen/src/anim/character/beta.rs index a06a876332..5b0b87e28b 100644 --- a/voxygen/src/anim/character/beta.rs +++ b/voxygen/src/anim/character/beta.rs @@ -116,9 +116,10 @@ impl Animation for BetaAnimation { next.glider.ori = Quaternion::rotation_y(0.0); next.glider.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = + Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4); + next.lantern.scale = Vec3::one() * 0.65; next.l_control.offset = Vec3::new(0.0, 0.0, 0.0); next.l_control.ori = Quaternion::rotation_x(0.0); diff --git a/voxygen/src/anim/character/charge.rs b/voxygen/src/anim/character/charge.rs index bd5d9d6b2a..ea016471d8 100644 --- a/voxygen/src/anim/character/charge.rs +++ b/voxygen/src/anim/character/charge.rs @@ -175,9 +175,9 @@ impl Animation for ChargeAnimation { next.glider.ori = Quaternion::rotation_y(0.0); next.glider.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1); + next.lantern.scale = Vec3::one() * 0.65; next.l_control.offset = Vec3::new(0.0, 0.0, 0.0); next.l_control.ori = Quaternion::rotation_x(0.0); diff --git a/voxygen/src/anim/character/climb.rs b/voxygen/src/anim/character/climb.rs index d2ea2f66da..5787dd4fc3 100644 --- a/voxygen/src/anim/character/climb.rs +++ b/voxygen/src/anim/character/climb.rs @@ -58,7 +58,7 @@ impl Animation for ClimbAnimation { next.belt.scale = Vec3::one(); next.back.offset = Vec3::new(0.0, -2.8, 7.25); - next.back.ori = Quaternion::rotation_z(-0.2); + next.back.ori = Quaternion::rotation_x(-0.2); next.back.scale = Vec3::one() * 1.02; next.shorts.offset = Vec3::new(0.0, 1.0, -5.0); @@ -111,9 +111,10 @@ impl Animation for ClimbAnimation { next.second.ori = Quaternion::rotation_y(0.0); next.second.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = + Quaternion::rotation_x(smooth * -0.3) * Quaternion::rotation_y(smooth * -0.3); + next.lantern.scale = Vec3::one() * 0.65; next.torso.offset = Vec3::new(0.0, -0.2 + smooth * -0.08, 0.4) * skeleton_attr.scaler; next.torso.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0); diff --git a/voxygen/src/anim/character/dash.rs b/voxygen/src/anim/character/dash.rs index 05f64819c7..9be8006f0b 100644 --- a/voxygen/src/anim/character/dash.rs +++ b/voxygen/src/anim/character/dash.rs @@ -103,9 +103,10 @@ impl Animation for DashAnimation { next.glider.ori = Quaternion::rotation_y(0.0); next.glider.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = + Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4); + next.lantern.scale = Vec3::one() * 0.65; next.torso.offset = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler; next.torso.ori = diff --git a/voxygen/src/anim/character/jump.rs b/voxygen/src/anim/character/jump.rs index 82d09590c3..9961a6e356 100644 --- a/voxygen/src/anim/character/jump.rs +++ b/voxygen/src/anim/character/jump.rs @@ -98,9 +98,10 @@ impl Animation for JumpAnimation { next.second.ori = Quaternion::rotation_y(0.0); next.second.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = Quaternion::rotation_x(stop * 1.2 + slow * 0.3) + * Quaternion::rotation_y(stop * 0.4 + slow * 0.3); + next.lantern.scale = Vec3::one() * 0.65; next.torso.offset = Vec3::new(0.0, 0.0, 0.0) * skeleton_attr.scaler; next.torso.ori = Quaternion::rotation_x(-0.2); diff --git a/voxygen/src/anim/character/mod.rs b/voxygen/src/anim/character/mod.rs index 5268345286..9f50a3bd06 100644 --- a/voxygen/src/anim/character/mod.rs +++ b/voxygen/src/anim/character/mod.rs @@ -72,14 +72,14 @@ impl Skeleton for CharacterSkeleton { let r_control_mat = self.r_control.compute_base_matrix(); let main_mat = self.main.compute_base_matrix(); let second_mat = self.second.compute_base_matrix(); - + let shorts_mat = self.shorts.compute_base_matrix(); let head_mat = self.head.compute_base_matrix(); [ FigureBoneData::new(torso_mat * chest_mat * head_mat), FigureBoneData::new(torso_mat * chest_mat), FigureBoneData::new(torso_mat * chest_mat * self.belt.compute_base_matrix()), FigureBoneData::new(torso_mat * chest_mat * self.back.compute_base_matrix()), - FigureBoneData::new(torso_mat * chest_mat * self.shorts.compute_base_matrix()), + FigureBoneData::new(torso_mat * chest_mat * shorts_mat), FigureBoneData::new(torso_mat * chest_mat * control_mat * l_control_mat * l_hand_mat), FigureBoneData::new(torso_mat * chest_mat * control_mat * r_control_mat * r_hand_mat), FigureBoneData::new(torso_mat * self.l_foot.compute_base_matrix()), @@ -89,7 +89,9 @@ impl Skeleton for CharacterSkeleton { FigureBoneData::new(torso_mat * self.glider.compute_base_matrix()), FigureBoneData::new(torso_mat * chest_mat * control_mat * l_control_mat * main_mat), FigureBoneData::new(torso_mat * chest_mat * control_mat * r_control_mat * second_mat), - FigureBoneData::new(torso_mat * chest_mat * self.lantern.compute_base_matrix()), + FigureBoneData::new( + torso_mat * chest_mat * shorts_mat * self.lantern.compute_base_matrix(), + ), FigureBoneData::default(), ] } diff --git a/voxygen/src/anim/character/roll.rs b/voxygen/src/anim/character/roll.rs index 2357bfd180..e7fde1f91c 100644 --- a/voxygen/src/anim/character/roll.rs +++ b/voxygen/src/anim/character/roll.rs @@ -19,11 +19,11 @@ impl Animation for RollAnimation { *rate = 1.0; let mut next = (*skeleton).clone(); - let wave = (anim_time as f32 * 5.5).sin(); - let wave_quick = (anim_time as f32 * 9.5).sin(); - let wave_quick_cos = (anim_time as f32 * 9.5).cos(); - let wave_slow = (anim_time as f32 * 2.8 + PI).sin(); - let wave_dub = (anim_time as f32 * 5.5).sin(); + let wave = (anim_time as f32 * 4.5).sin(); + let wave_quick = (anim_time as f32 * 7.5).sin(); + let wave_quick_cos = (anim_time as f32 * 7.5).cos(); + let wave_slow = (anim_time as f32 * 2.3 + PI).sin(); + let wave_dub = (anim_time as f32 * 4.5).sin(); let ori = Vec2::from(orientation); let last_ori = Vec2::from(last_ori); @@ -116,9 +116,9 @@ impl Animation for RollAnimation { next.second.ori = Quaternion::rotation_y(0.0); next.second.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1); + next.lantern.scale = Vec3::one() * 0.65; next.torso.offset = Vec3::new(0.0, 0.0, 0.1 + wave_dub * 16.0) / 11.0 * skeleton_attr.scaler; diff --git a/voxygen/src/anim/character/run.rs b/voxygen/src/anim/character/run.rs index 3c9917ae2b..7c475ba3bb 100644 --- a/voxygen/src/anim/character/run.rs +++ b/voxygen/src/anim/character/run.rs @@ -31,6 +31,13 @@ impl Animation for RunAnimation { / (1.5 + 3.5 * ((anim_time as f32 * lab as f32 * 16.0).sin()).powf(2.0 as f32))) .sqrt()) * ((anim_time as f32 * lab as f32 * 16.0).sin()); + let noisea = (anim_time as f32 * 11.0 + PI / 6.0).sin(); + let noiseb = (anim_time as f32 * 19.0 + PI / 4.0).sin(); + + let shorte = (((5.0) + / (4.0 + 1.0 * ((anim_time as f32 * lab as f32 * 16.0).sin()).powf(2.0 as f32))) + .sqrt()) + * ((anim_time as f32 * lab as f32 * 16.0).sin()); let shortalt = (((5.0) / (1.5 @@ -91,7 +98,7 @@ impl Animation for RunAnimation { next.belt.scale = Vec3::one(); next.back.offset = Vec3::new(0.0, -2.8, 7.25); - next.back.ori = Quaternion::rotation_x(-0.2 + short * 0.2); + next.back.ori = Quaternion::rotation_x(-0.25 + short * 0.1 + noisea * 0.1 + noiseb * 0.1); next.back.scale = Vec3::one() * 1.02; next.shorts.offset = Vec3::new(0.0, 0.0, -5.0); @@ -152,9 +159,10 @@ impl Animation for RunAnimation { next.second.ori = Quaternion::rotation_y(0.0); next.second.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 5.0, 0.0); - next.lantern.ori = Quaternion::rotation_y(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = + Quaternion::rotation_x(shorte * -0.7 + 0.4) * Quaternion::rotation_y(shorte * 0.4); + next.lantern.scale = Vec3::one() * 0.65; next.torso.offset = Vec3::new(0.0, -0.3 + shortalt * -0.065, 0.0) * skeleton_attr.scaler; next.torso.ori = diff --git a/voxygen/src/anim/character/shoot.rs b/voxygen/src/anim/character/shoot.rs index f064477536..50525f6a49 100644 --- a/voxygen/src/anim/character/shoot.rs +++ b/voxygen/src/anim/character/shoot.rs @@ -154,9 +154,10 @@ impl Animation for ShootAnimation { next.glider.ori = Quaternion::rotation_y(0.0); next.glider.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = + Quaternion::rotation_x(exp * -0.7 + 0.4) * Quaternion::rotation_y(exp * 0.4); + next.lantern.scale = Vec3::one() * 0.65; next.l_control.offset = Vec3::new(0.0, 0.0, 0.0); next.l_control.ori = Quaternion::rotation_x(0.0); diff --git a/voxygen/src/anim/character/spin.rs b/voxygen/src/anim/character/spin.rs index 27d3391da9..b82ae289b5 100644 --- a/voxygen/src/anim/character/spin.rs +++ b/voxygen/src/anim/character/spin.rs @@ -106,9 +106,10 @@ impl Animation for SpinAnimation { next.glider.ori = Quaternion::rotation_y(0.0); next.glider.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = + Quaternion::rotation_x(spin * -0.7 + 0.4) * Quaternion::rotation_y(spin * 0.4); + next.lantern.scale = Vec3::one() * 0.65; next.l_control.offset = Vec3::new(0.0, 0.0, 0.0); next.l_control.ori = Quaternion::rotation_x(0.0); diff --git a/voxygen/src/anim/character/stand.rs b/voxygen/src/anim/character/stand.rs index 2159798342..486d350313 100644 --- a/voxygen/src/anim/character/stand.rs +++ b/voxygen/src/anim/character/stand.rs @@ -44,19 +44,19 @@ impl Animation for StandAnimation { next.chest.offset = Vec3::new(0.0, 0.0, 7.0 + slow * 0.3); next.chest.ori = Quaternion::rotation_z(head_look.x * 0.6); - next.chest.scale = Vec3::one() * 1.01 + breathe * 0.05; + next.chest.scale = Vec3::one() * 1.01 + breathe * 0.03; - next.belt.offset = Vec3::new(0.0, 0.0, -2.0); //5 + next.belt.offset = Vec3::new(0.0, 0.0, -2.0); next.belt.ori = Quaternion::rotation_z(head_look.x * -0.1); - next.belt.scale = Vec3::one() + breathe * -0.05; + next.belt.scale = Vec3::one() + breathe * -0.03; next.back.offset = Vec3::new(0.0, -2.8, 7.25); next.back.ori = Quaternion::rotation_z(0.0); next.back.scale = Vec3::one() * 1.02; - next.shorts.offset = Vec3::new(0.0, 0.0, -5.0); //2 - next.shorts.ori = Quaternion::rotation_x(head_look.x * -0.2); - next.shorts.scale = Vec3::one() + breathe * -0.05; + next.shorts.offset = Vec3::new(0.0, 0.0, -5.0); + next.shorts.ori = Quaternion::rotation_z(head_look.x * -0.2); + next.shorts.scale = Vec3::one() + breathe * -0.03; next.l_hand.offset = Vec3::new(-7.0, -0.25 + slow * 0.15, 5.0 + slow * 0.5); @@ -103,9 +103,9 @@ impl Animation for StandAnimation { next.second.ori = Quaternion::rotation_y(0.0); next.second.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 0.0, 0.0); - next.lantern.ori = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 1.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1); + next.lantern.scale = Vec3::one() * 0.65; next.torso.offset = Vec3::new(0.0, -0.1, 0.1) * skeleton_attr.scaler; next.torso.ori = Quaternion::rotation_x(0.0); diff --git a/voxygen/src/anim/character/swim.rs b/voxygen/src/anim/character/swim.rs index 0b2102f9ff..1fd23c4c8a 100644 --- a/voxygen/src/anim/character/swim.rs +++ b/voxygen/src/anim/character/swim.rs @@ -115,9 +115,9 @@ impl Animation for SwimAnimation { next.second.ori = Quaternion::rotation_y(0.0); next.second.scale = Vec3::one() * 0.0; - next.lantern.offset = Vec3::new(0.0, 5.0, 0.0); - next.lantern.ori = Quaternion::rotation_y(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.offset = Vec3::new(-5.0, 2.5, 5.5); + next.lantern.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0); + next.lantern.scale = Vec3::one() * 0.65; next.torso.offset = Vec3::new(0.0, -0.3 + shortalt * -0.065, 0.4) * skeleton_attr.scaler; next.torso.ori = diff --git a/voxygen/src/anim/character/wield.rs b/voxygen/src/anim/character/wield.rs index c0c5143a0b..403796c601 100644 --- a/voxygen/src/anim/character/wield.rs +++ b/voxygen/src/anim/character/wield.rs @@ -27,6 +27,8 @@ impl Animation for WieldAnimation { / (1.5 + 3.5 * ((anim_time as f32 * lab as f32 * 16.0).sin()).powf(2.0 as f32))) .sqrt()) * ((anim_time as f32 * lab as f32 * 16.0).sin()); + let noisea = (anim_time as f32 * 11.0 + PI / 6.0).sin(); + let noiseb = (anim_time as f32 * 19.0 + PI / 4.0).sin(); let wave = (anim_time as f32 * 16.0).sin(); match active_tool_kind { //TODO: Inventory @@ -199,7 +201,9 @@ impl Animation for WieldAnimation { next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler; next.back.offset = Vec3::new(0.0, -2.8, 7.25); - next.back.ori = Quaternion::rotation_x(-0.4 + short * 0.3); + next.back.ori = Quaternion::rotation_x( + (-0.25 + short * 0.3 + noisea * 0.4 + noiseb * 0.4).min(-0.1), + ); next.back.scale = Vec3::one() * 1.02; next.l_control.offset = Vec3::new(0.0, 0.0, 0.0);