From 2bc0699f973a7dc97974ad05f348cbbf3a687eae Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Wed, 21 Apr 2021 16:54:03 +0100 Subject: [PATCH] Improvements to lantern holding when sitting --- voxygen/anim/src/character/run.rs | 2 +- voxygen/anim/src/character/sit.rs | 4 ++-- voxygen/anim/src/character/stand.rs | 2 +- voxygen/anim/src/character/wield.rs | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/voxygen/anim/src/character/run.rs b/voxygen/anim/src/character/run.rs index 3c0afdbe14..25d9139715 100644 --- a/voxygen/anim/src/character/run.rs +++ b/voxygen/anim/src/character/run.rs @@ -264,7 +264,7 @@ impl Animation for RunAnimation { ); next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9); - next.lantern.position = Vec3::new(0.0, 0.0, -3.5); + next.lantern.position = Vec3::new(0.0, 0.0, -2.5); next.lantern.orientation = next.hand_r.orientation.inverse() * Quaternion::rotation_x((foothorir + 0.5) * 1.0 * speednorm) * Quaternion::rotation_y(tilt * 4.0 * foothorir + tilt * 3.0); diff --git a/voxygen/anim/src/character/sit.rs b/voxygen/anim/src/character/sit.rs index 4de7063908..558e184ba6 100644 --- a/voxygen/anim/src/character/sit.rs +++ b/voxygen/anim/src/character/sit.rs @@ -90,8 +90,8 @@ impl Animation for SitAnimation { if skeleton.holding_lantern { next.hand_r.position = Vec3::new( s_a.hand.0 - head_look.x * 10.0, - s_a.hand.1 + 5.0 - head_look.y * 8.0, - s_a.hand.2 + 11.0, + s_a.hand.1 + 5.0 + head_look.y * 12.0, + s_a.hand.2 + 9.0 - head_look.y * 12.0, ); next.hand_r.orientation = Quaternion::rotation_x(2.25) * Quaternion::rotation_z(0.9) diff --git a/voxygen/anim/src/character/stand.rs b/voxygen/anim/src/character/stand.rs index c093140847..242f365de4 100644 --- a/voxygen/anim/src/character/stand.rs +++ b/voxygen/anim/src/character/stand.rs @@ -149,7 +149,7 @@ impl Animation for StandAnimation { s_a.hand.1 + 5.0 - head_look.y * 8.0 + slow * 0.15 - impact * 0.2, s_a.hand.2 + 11.0 + slow * 0.5 + impact * -0.1, ); - next.hand_r.orientation = Quaternion::rotation_x(2.25 + slow * -0.06 + impact * -0.1) + next.hand_r.orientation = Quaternion::rotation_x(2.5 + slow * -0.06 + impact * -0.1) * Quaternion::rotation_z(0.9) * Quaternion::rotation_y(head_look.x * 3.0) * Quaternion::rotation_x(head_look.y * 3.0); diff --git a/voxygen/anim/src/character/wield.rs b/voxygen/anim/src/character/wield.rs index 4764eedfa2..aaa4f035d2 100644 --- a/voxygen/anim/src/character/wield.rs +++ b/voxygen/anim/src/character/wield.rs @@ -320,17 +320,17 @@ impl Animation for WieldAnimation { }; match hands { (None, None) | (None, Some(Hands::One)) => { - //next.hand_l.position = Vec3::new(-4.5, 8.0, 5.0); - //next.hand_l.orientation = Quaternion::rotation_x(1.9) * - // Quaternion::rotation_y(-0.5) + next.hand_l.position = Vec3::new(-8.0, 2.0, 1.0); + next.hand_l.orientation = + Quaternion::rotation_x(0.5) * Quaternion::rotation_y(0.25); }, (_, _) => {}, }; match hands { (None, None) | (Some(Hands::One), None) => { - //next.hand_r.position = Vec3::new(4.5, 8.0, 5.0); - //next.hand_r.orientation = Quaternion::rotation_x(1.9) * - // Quaternion::rotation_y(0.5) + next.hand_r.position = Vec3::new(8.0, 2.0, 1.0); + next.hand_r.orientation = + Quaternion::rotation_x(0.5) * Quaternion::rotation_y(-0.25); }, (_, _) => {}, };