From 5929cfa5c713aa392110bbb62407f76caf53c3df Mon Sep 17 00:00:00 2001 From: jshipsey Date: Thu, 6 Aug 2020 20:47:27 -0400 Subject: [PATCH] fixed in-hand arrow bug --- voxygen/src/anim/src/character/alpha.rs | 1 + voxygen/src/anim/src/character/beta.rs | 1 + voxygen/src/anim/src/character/block.rs | 1 + voxygen/src/anim/src/character/blockidle.rs | 1 + voxygen/src/anim/src/character/climb.rs | 1 + voxygen/src/anim/src/character/dance.rs | 1 + voxygen/src/anim/src/character/dash.rs | 1 + voxygen/src/anim/src/character/equip.rs | 1 + voxygen/src/anim/src/character/glidewield.rs | 1 + voxygen/src/anim/src/character/gliding.rs | 1 + voxygen/src/anim/src/character/idle.rs | 5 +++-- voxygen/src/anim/src/character/jump.rs | 1 + voxygen/src/anim/src/character/leapmelee.rs | 1 + voxygen/src/anim/src/character/roll.rs | 1 + voxygen/src/anim/src/character/run.rs | 1 + voxygen/src/anim/src/character/sit.rs | 1 + voxygen/src/anim/src/character/spin.rs | 1 + voxygen/src/anim/src/character/spinmelee.rs | 1 + voxygen/src/anim/src/character/stand.rs | 3 ++- voxygen/src/anim/src/character/swim.rs | 1 + 20 files changed, 23 insertions(+), 3 deletions(-) diff --git a/voxygen/src/anim/src/character/alpha.rs b/voxygen/src/anim/src/character/alpha.rs index 187ae40c2e..697c369581 100644 --- a/voxygen/src/anim/src/character/alpha.rs +++ b/voxygen/src/anim/src/character/alpha.rs @@ -117,6 +117,7 @@ impl Animation for AlphaAnimation { next.lantern.orientation = Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4); + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_z(0.0) diff --git a/voxygen/src/anim/src/character/beta.rs b/voxygen/src/anim/src/character/beta.rs index 07ecfa68da..d4dd4d81ab 100644 --- a/voxygen/src/anim/src/character/beta.rs +++ b/voxygen/src/anim/src/character/beta.rs @@ -132,6 +132,7 @@ impl Animation for BetaAnimation { next.lantern.orientation = Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.l_control.scale = Vec3::one(); diff --git a/voxygen/src/anim/src/character/block.rs b/voxygen/src/anim/src/character/block.rs index 2d58ba282e..67099c8d58 100644 --- a/voxygen/src/anim/src/character/block.rs +++ b/voxygen/src/anim/src/character/block.rs @@ -205,6 +205,7 @@ impl Animation for BlockAnimation { ); next.lantern.orientation = Quaternion::rotation_x(0.0); next.lantern.scale = Vec3::one() * 0.0; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, -0.2, 0.1) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_x(0.0); diff --git a/voxygen/src/anim/src/character/blockidle.rs b/voxygen/src/anim/src/character/blockidle.rs index 5eb31c9d12..43a5ff1fb1 100644 --- a/voxygen/src/anim/src/character/blockidle.rs +++ b/voxygen/src/anim/src/character/blockidle.rs @@ -333,6 +333,7 @@ impl Animation for BlockIdleAnimation { ); next.lantern.orientation = Quaternion::rotation_x(0.0); next.lantern.scale = Vec3::one(); + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, -0.2, 0.1) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_x(0.0); diff --git a/voxygen/src/anim/src/character/climb.rs b/voxygen/src/anim/src/character/climb.rs index 6b01c2b028..c7a510c9ae 100644 --- a/voxygen/src/anim/src/character/climb.rs +++ b/voxygen/src/anim/src/character/climb.rs @@ -179,6 +179,7 @@ impl Animation for ClimbAnimation { next.lantern.orientation = Quaternion::rotation_x(smooth * -0.3) * Quaternion::rotation_y(smooth * -0.3); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, -0.2 + smooth * -0.08, 0.4) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0); diff --git a/voxygen/src/anim/src/character/dance.rs b/voxygen/src/anim/src/character/dance.rs index 624077fc41..6abdd7328e 100644 --- a/voxygen/src/anim/src/character/dance.rs +++ b/voxygen/src/anim/src/character/dance.rs @@ -184,6 +184,7 @@ impl Animation for DanceAnimation { next.lantern.orientation = Quaternion::rotation_x(shorte * 0.7 + 0.4) * Quaternion::rotation_y(shorte * 0.4); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, -0.3, 0.0) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_z(short * -0.2); diff --git a/voxygen/src/anim/src/character/dash.rs b/voxygen/src/anim/src/character/dash.rs index 6b49943f41..8e1cf865c3 100644 --- a/voxygen/src/anim/src/character/dash.rs +++ b/voxygen/src/anim/src/character/dash.rs @@ -188,6 +188,7 @@ impl Animation for DashAnimation { ); next.lantern.orientation = Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4); + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler; next.torso.orientation = diff --git a/voxygen/src/anim/src/character/equip.rs b/voxygen/src/anim/src/character/equip.rs index 90d929c255..ff07260341 100644 --- a/voxygen/src/anim/src/character/equip.rs +++ b/voxygen/src/anim/src/character/equip.rs @@ -203,6 +203,7 @@ impl Animation for EquipAnimation { .sin() * 0.1, ); + next.hold.scale = Vec3::one() * 0.0; if velocity > 0.5 { next.torso.position = Vec3::new(0.0, 0.0, 0.0) * skeleton_attr.scaler; diff --git a/voxygen/src/anim/src/character/glidewield.rs b/voxygen/src/anim/src/character/glidewield.rs index 61dbd69ee9..c9e5bc36b1 100644 --- a/voxygen/src/anim/src/character/glidewield.rs +++ b/voxygen/src/anim/src/character/glidewield.rs @@ -251,6 +251,7 @@ impl Animation for GlideWieldAnimation { next.lantern.orientation = Quaternion::rotation_x(shorte * 0.7 + 0.4) * Quaternion::rotation_y(shorte * 0.4); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, 0.0, 0.0) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_y(0.0); diff --git a/voxygen/src/anim/src/character/gliding.rs b/voxygen/src/anim/src/character/gliding.rs index ca50605437..738eec1ee4 100644 --- a/voxygen/src/anim/src/character/gliding.rs +++ b/voxygen/src/anim/src/character/gliding.rs @@ -161,6 +161,7 @@ impl Animation for GlidingAnimation { skeleton_attr.lantern.2, ); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, -4.0, 10.0) / 11.0 * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_x(-0.06 * speed.max(12.0) + slow * 0.04) diff --git a/voxygen/src/anim/src/character/idle.rs b/voxygen/src/anim/src/character/idle.rs index 5f77d28a68..9b76637dec 100644 --- a/voxygen/src/anim/src/character/idle.rs +++ b/voxygen/src/anim/src/character/idle.rs @@ -153,8 +153,9 @@ impl Animation for IdleAnimation { skeleton_attr.lantern.1, skeleton_attr.lantern.2, ); - next.lantern.orientation = Quaternion::rotation_x(0.0); - next.lantern.scale = Vec3::one() * 0.0; + next.lantern.orientation = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1); + next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, -0.2, 0.1) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_x(0.0); diff --git a/voxygen/src/anim/src/character/jump.rs b/voxygen/src/anim/src/character/jump.rs index ac001ce3bd..1506f87017 100644 --- a/voxygen/src/anim/src/character/jump.rs +++ b/voxygen/src/anim/src/character/jump.rs @@ -198,6 +198,7 @@ impl Animation for JumpAnimation { next.lantern.orientation = Quaternion::rotation_x(1.0 * switch + slow * 0.3 * switch) * Quaternion::rotation_y(0.6 * switch + slow * 0.3 * switch); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, 0.0, 0.0) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_x(-0.2); diff --git a/voxygen/src/anim/src/character/leapmelee.rs b/voxygen/src/anim/src/character/leapmelee.rs index f2e3340136..dada5b978d 100644 --- a/voxygen/src/anim/src/character/leapmelee.rs +++ b/voxygen/src/anim/src/character/leapmelee.rs @@ -70,6 +70,7 @@ impl Animation for LeapAnimation { next.lantern.orientation = Quaternion::rotation_x(slower * -0.7 + 0.4) * Quaternion::rotation_y(slower * 0.4); + next.hold.scale = Vec3::one() * 0.0; next.l_foot.position = Vec3::new( -skeleton_attr.foot.0, diff --git a/voxygen/src/anim/src/character/roll.rs b/voxygen/src/anim/src/character/roll.rs index ac83f5a7fd..1db19b1381 100644 --- a/voxygen/src/anim/src/character/roll.rs +++ b/voxygen/src/anim/src/character/roll.rs @@ -167,6 +167,7 @@ impl Animation for RollAnimation { ); next.lantern.orientation = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, 0.0, 8.0) / 11.0 * skeleton_attr.scaler; next.torso.orientation = diff --git a/voxygen/src/anim/src/character/run.rs b/voxygen/src/anim/src/character/run.rs index 58a2a90c83..7bbedaefe9 100644 --- a/voxygen/src/anim/src/character/run.rs +++ b/voxygen/src/anim/src/character/run.rs @@ -249,6 +249,7 @@ impl Animation for RunAnimation { next.lantern.orientation = Quaternion::rotation_x(shorte * 0.7 + 0.4) * Quaternion::rotation_y(shorte * 0.4); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, -0.3, 0.0) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_y(0.0); diff --git a/voxygen/src/anim/src/character/sit.rs b/voxygen/src/anim/src/character/sit.rs index 86ca5336e5..f7d61a1e08 100644 --- a/voxygen/src/anim/src/character/sit.rs +++ b/voxygen/src/anim/src/character/sit.rs @@ -168,6 +168,7 @@ impl Animation for SitAnimation { skeleton_attr.lantern.2, ); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, -0.2, stop * -0.16) * skeleton_attr.scaler; next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler; diff --git a/voxygen/src/anim/src/character/spin.rs b/voxygen/src/anim/src/character/spin.rs index c7b96df62c..edf41e9d0d 100644 --- a/voxygen/src/anim/src/character/spin.rs +++ b/voxygen/src/anim/src/character/spin.rs @@ -123,6 +123,7 @@ impl Animation for SpinAnimation { next.lantern.orientation = Quaternion::rotation_x(spin * -0.7 + 0.4) * Quaternion::rotation_y(spin * 0.4); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.l_control.position = Vec3::new(0.0, 0.0, 0.0); next.l_control.orientation = Quaternion::rotation_x(0.0); diff --git a/voxygen/src/anim/src/character/spinmelee.rs b/voxygen/src/anim/src/character/spinmelee.rs index 023e0d181b..b7c06d9fe4 100644 --- a/voxygen/src/anim/src/character/spinmelee.rs +++ b/voxygen/src/anim/src/character/spinmelee.rs @@ -155,6 +155,7 @@ impl Animation for SpinMeleeAnimation { next.lantern.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.7) * Quaternion::rotation_y(-0.8); + next.hold.scale = Vec3::one() * 0.0; next.glider.position = Vec3::new(0.0, 0.0, 10.0); next.glider.scale = Vec3::one() * 0.0; next.l_control.scale = Vec3::one(); diff --git a/voxygen/src/anim/src/character/stand.rs b/voxygen/src/anim/src/character/stand.rs index ddb3887780..3362bd4ea2 100644 --- a/voxygen/src/anim/src/character/stand.rs +++ b/voxygen/src/anim/src/character/stand.rs @@ -127,7 +127,8 @@ impl Animation for StandAnimation { next.glider.position = Vec3::new(0.0, 0.0, 10.0); next.glider.scale = Vec3::one() * 0.0; - + next.hold.position = Vec3::new(0.4, -0.3, -5.8); + next.hold.scale = Vec3::one() * 0.0; match active_tool_kind { Some(ToolKind::Dagger(_)) => { next.main.position = Vec3::new(-4.0, -5.0, 7.0); diff --git a/voxygen/src/anim/src/character/swim.rs b/voxygen/src/anim/src/character/swim.rs index bd218307da..5e087bf6de 100644 --- a/voxygen/src/anim/src/character/swim.rs +++ b/voxygen/src/anim/src/character/swim.rs @@ -198,6 +198,7 @@ impl Animation for SwimAnimation { ); next.lantern.orientation = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0); next.lantern.scale = Vec3::one() * 0.65; + next.hold.scale = Vec3::one() * 0.0; next.torso.position = Vec3::new(0.0, -1.2 + shortalt * -0.065, 0.4) * skeleton_attr.scaler; next.torso.orientation = Quaternion::rotation_x(speed * -0.190 * wave_stop * 1.05)