diff --git a/assets/voxygen/voxel/biped_weapon_manifest.ron b/assets/voxygen/voxel/biped_weapon_manifest.ron index 7f9c395e8b..9233487f66 100644 --- a/assets/voxygen/voxel/biped_weapon_manifest.ron +++ b/assets/voxygen/voxel/biped_weapon_manifest.ron @@ -165,15 +165,15 @@ ), // 1h Swords "common.items.weapons.sword_1h.bloodsteel-0": ( - vox_spec: ("weapon.sword_1h.bloodsteel-0", (-2.0, -4.5, -3.0)), + vox_spec: ("weapon.sword_1h.bloodsteel-0", (-2.5, -3.5, -3.0)), color: None ), "common.items.weapons.sword_1h.bloodsteel-1": ( - vox_spec: ("weapon.sword_1h.bloodsteel-1", (-2.0, -4.5, -3.0)), + vox_spec: ("weapon.sword_1h.bloodsteel-1", (-1.5, -3.0, -3.0)), color: None ), "common.items.weapons.sword_1h.bloodsteel-2": ( - vox_spec: ("weapon.sword_1h.bloodsteel-2", (-2.0, -4.5, -3.0)), + vox_spec: ("weapon.sword_1h.bloodsteel-2", (-1.5, -3.0, -3.0)), color: None ), "common.items.weapons.sword_1h.bronze-0": ( @@ -391,11 +391,11 @@ ), // 1h Axes "common.items.weapons.axe_1h.bloodsteel-0": ( - vox_spec: ("weapon.axe_1h.bloodsteel-0", (-1.5, -7.5, -3.0)), + vox_spec: ("weapon.axe_1h.bloodsteel-0", (-1.5, -2.0, -3.0)), color: None ), "common.items.weapons.axe_1h.bloodsteel-1": ( - vox_spec: ("weapon.axe_1h.bloodsteel-1", (-1.5, -5.0, -3.0)), + vox_spec: ("weapon.axe_1h.bloodsteel-1", (-1.5, -2.0, -3.0)), color: None ), "common.items.weapons.axe_1h.bronze-0": ( @@ -609,7 +609,7 @@ ),*/ // 1h Hammers "common.items.weapons.hammer_1h.bloodsteel-0": ( - vox_spec: ("weapon.hammer_1h.bloodsteel-0", (-1.5, -5.0, -6.0)), + vox_spec: ("weapon.hammer_1h.bloodsteel-0", (-2.5, -3.0, -3.0)), color: None ), "common.items.weapons.hammer_1h.bloodsteel-1": ( diff --git a/assets/voxygen/voxel/weapon/axe_1h/bloodsteel-0.vox b/assets/voxygen/voxel/weapon/axe_1h/bloodsteel-0.vox index 3e79b3e4e9..fdb6c75128 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/bloodsteel-0.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/bloodsteel-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b775d2bda4066cb06c47f176db3a079288d491125e6752cc66567d642bfbe1d7 +oid sha256:3986fdd613d1818e7b98aa20782b4e39be48ecd4f60d0f7680dfaefd55eef25a size 1372 diff --git a/assets/voxygen/voxel/weapon/axe_1h/bloodsteel-1.vox b/assets/voxygen/voxel/weapon/axe_1h/bloodsteel-1.vox index 7c1dc283dc..8eed563bf1 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/bloodsteel-1.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/bloodsteel-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4b3ed736ed988fc830403affd8028fb936edbf334c38745e19c39f18bf53a26b +oid sha256:ea14c5fb92abb19b1c2e66f9693df312a5bfa39a74481394a8264059043b635d size 1420 diff --git a/assets/voxygen/voxel/weapon/axe_1h/bronze-0.vox b/assets/voxygen/voxel/weapon/axe_1h/bronze-0.vox index d3782dc5fe..b321c5504b 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/bronze-0.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/bronze-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cefe36bc327efed7df4a647d7afea5e1595143aa70abd305d195e5f79ba28606 +oid sha256:2f8cfad942c25f75ee5757bba38f8a7a46b3990e3b886a276bafd5f72612d8fc size 1380 diff --git a/assets/voxygen/voxel/weapon/axe_1h/bronze-1.vox b/assets/voxygen/voxel/weapon/axe_1h/bronze-1.vox index fa4a42f56c..20811d20c5 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/bronze-1.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/bronze-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64bf3932ac8cd260e85cd1cf16fab9128e29254c54463f598f0bc2fdd1bc464b +oid sha256:5fd68dfb404151a65c43c99e16da177cf132295f7a8b27c87140756ebe761112 size 1392 diff --git a/assets/voxygen/voxel/weapon/axe_1h/cobalt-1.vox b/assets/voxygen/voxel/weapon/axe_1h/cobalt-1.vox index 8be945daa2..5eb08bc1fb 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/cobalt-1.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/cobalt-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b810369a2524c3379ff3d92ba244a6bb567cfa7ee7b968bbeb619efbd5ccacbd +oid sha256:d761bb744fe61d1c6abd885da70464ffe54881b5358f038d5c25cfeda5a9b76f size 1544 diff --git a/assets/voxygen/voxel/weapon/axe_1h/iron-0.vox b/assets/voxygen/voxel/weapon/axe_1h/iron-0.vox index ba856993bc..a6b6d2f016 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/iron-0.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/iron-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a62e8d72ef0c8a36e2eeceb56bd34621305f595b22e72ff0ea5e1215037030a +oid sha256:09fd576aaca4a2b1009c59b881f5a9d4c5374778c95daf4e47d9e9df748837e1 size 1380 diff --git a/assets/voxygen/voxel/weapon/axe_1h/iron-2.vox b/assets/voxygen/voxel/weapon/axe_1h/iron-2.vox index 8499437079..20e596d0fc 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/iron-2.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/iron-2.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2fd5265f0c7d64fd6f01cc52c0dbea6bdaf19cda378f79214db6a5e88c40a9f5 +oid sha256:e5cfcef43bdb61e48075b4c6ee309bc982a71e8709389560a82a0a696c1ceb3c size 1356 diff --git a/assets/voxygen/voxel/weapon/axe_1h/iron-3.vox b/assets/voxygen/voxel/weapon/axe_1h/iron-3.vox index efddcef509..a8cbeecdc7 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/iron-3.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/iron-3.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cdeeec6612c74b930ac2becc3b80f156fa802d1455ac3ed435b5ae1cc1b17e0b +oid sha256:eed532ca4309158605d3e88040fe8022a4da52c893656148a02f9e96ab1a0429 size 1480 diff --git a/assets/voxygen/voxel/weapon/axe_1h/steel-0.vox b/assets/voxygen/voxel/weapon/axe_1h/steel-0.vox index a4741b2655..a22f1c4779 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/steel-0.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/steel-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7448f39faf1dd18a55cbe630f1a60a39b2f00c78f61c96c2358c5933138c48b -size 1456 +oid sha256:cd808ffc62e36a7de94a3d7d5a31d4c12a1a1f890c056ac400d0981a1bc32bd1 +size 1880 diff --git a/assets/voxygen/voxel/weapon/axe_1h/steel-1.vox b/assets/voxygen/voxel/weapon/axe_1h/steel-1.vox index 799722ffda..e0d806aa53 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/steel-1.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/steel-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cafa32b99792535f62588048bcc55d976c3d9c01d63c7f69020cf680941daa31 +oid sha256:37231292e5ff7d8ec2c07f0e67af9325d8aac313907bc08978a68fa9cacfca91 size 1424 diff --git a/assets/voxygen/voxel/weapon/axe_1h/steel-2.vox b/assets/voxygen/voxel/weapon/axe_1h/steel-2.vox index b29980fbfd..8d1ac2aef2 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/steel-2.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/steel-2.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d5e26ad5d492ac0f6da7da720d00235c16de81ed5a487bdad47a64a56838e419 +oid sha256:17d57c8f571334a26ecc554103e5fcc2c6738d4c69b3bc53856f4d188c193984 size 1444 diff --git a/assets/voxygen/voxel/weapon/axe_1h/stone-0.vox b/assets/voxygen/voxel/weapon/axe_1h/stone-0.vox index 28643c0ff9..373a8b07c3 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/stone-0.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/stone-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84afad5f98fa515c7f9b1e3c2443ac2dd54040674cb265c8a46d703669baeeba +oid sha256:263ce585ed3c29859e42bbac5149cf1efacacea36a17b53feea146291b4bb465 size 1508 diff --git a/assets/voxygen/voxel/weapon/axe_1h/stone-1.vox b/assets/voxygen/voxel/weapon/axe_1h/stone-1.vox index 5c8651e203..80041e689c 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/stone-1.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/stone-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:997b72661929669470870b20ce36b3f1c3803e06856b84ae9ffd067b438dcbbe +oid sha256:92ab658b8d3184db94d576d2f0c28a2446fd30dc23a52da30f2091f9ece9e212 size 1396 diff --git a/assets/voxygen/voxel/weapon/axe_1h/wood-0.vox b/assets/voxygen/voxel/weapon/axe_1h/wood-0.vox index 148e62aaf7..832239296b 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/wood-0.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/wood-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9363e47237cdb98a555a295aa5858c930f4e3b517288fe9b1ed268193254d9f3 +oid sha256:738fa05fdb2ca216dfd774468c79fa4522a713172faaffdc9cdb10614e01d0e0 size 1488 diff --git a/assets/voxygen/voxel/weapon/axe_1h/wood-1.vox b/assets/voxygen/voxel/weapon/axe_1h/wood-1.vox index 81487c12e2..788c3d1ff2 100644 --- a/assets/voxygen/voxel/weapon/axe_1h/wood-1.vox +++ b/assets/voxygen/voxel/weapon/axe_1h/wood-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38605b2361ea20f7b928429eb1e59e8785f45b9d7f6eedd36be7dd4eb4b39ef9 +oid sha256:b683f78dba8f465605213f8ae31f8b7e9f073f65781bdbc4ab81e8541e32a67d size 1404 diff --git a/assets/voxygen/voxel/weapon/hammer_1h/bloodsteel-1.vox b/assets/voxygen/voxel/weapon/hammer_1h/bloodsteel-1.vox index b865d64912..dcc1643cd5 100644 --- a/assets/voxygen/voxel/weapon/hammer_1h/bloodsteel-1.vox +++ b/assets/voxygen/voxel/weapon/hammer_1h/bloodsteel-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c71f89e8be0a153745bdddd77266718c28e83b0bb2073684e016826052f4dc02 +oid sha256:ca4ab154b05d618bd057a3ac8067bc9ee84c08c157f2224521139c922d4f1b08 size 1552 diff --git a/assets/voxygen/voxel/weapon/hammer_1h/iron-0.vox b/assets/voxygen/voxel/weapon/hammer_1h/iron-0.vox index 31b46fbbf1..6041078a74 100644 --- a/assets/voxygen/voxel/weapon/hammer_1h/iron-0.vox +++ b/assets/voxygen/voxel/weapon/hammer_1h/iron-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9c272023ca391ee4b5ca6252a9ef4e9f104868068e8a9e38e5d1d4a3028cea9 +oid sha256:5b3dafd8b0f6e0365d71bc5a6cd201d7e469ed27cbb85cb2c3e838694c9c83a5 size 1820 diff --git a/assets/voxygen/voxel/weapon/hammer_1h/steel-0.vox b/assets/voxygen/voxel/weapon/hammer_1h/steel-0.vox index 4a664ef6df..a22f1c4779 100644 --- a/assets/voxygen/voxel/weapon/hammer_1h/steel-0.vox +++ b/assets/voxygen/voxel/weapon/hammer_1h/steel-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77d22f6de03ac69d1aeb1f0077b185beb34bedfb6279ca91f5e3d734566716e7 +oid sha256:cd808ffc62e36a7de94a3d7d5a31d4c12a1a1f890c056ac400d0981a1bc32bd1 size 1880 diff --git a/assets/voxygen/voxel/weapon/hammer_1h/stone-0.vox b/assets/voxygen/voxel/weapon/hammer_1h/stone-0.vox index 6b42cf6e39..31e173bc5d 100644 --- a/assets/voxygen/voxel/weapon/hammer_1h/stone-0.vox +++ b/assets/voxygen/voxel/weapon/hammer_1h/stone-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:89879cf4fa89aa187dc0b450e958d59ee349381ddceec034fffbd319b45142fb +oid sha256:e9e1b47cf6095ebac1baa86a99f831d45316cce2f6aa2793a14a3329f4495493 size 1672 diff --git a/assets/voxygen/voxel/weapon/hammer_1h/stone-1.vox b/assets/voxygen/voxel/weapon/hammer_1h/stone-1.vox index 7fd616cccc..e47753ca61 100644 --- a/assets/voxygen/voxel/weapon/hammer_1h/stone-1.vox +++ b/assets/voxygen/voxel/weapon/hammer_1h/stone-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4d66fdb58b527dc24ea0bf922ec7649a8e59eee1c2363dfa786f27034332d522 +oid sha256:e5957b4d26fed12da13942ad3765c5dcac3b68a3f41baaed3d1b2f9858be817d size 1656 diff --git a/assets/voxygen/voxel/weapon/hammer_1h/wood-0.vox b/assets/voxygen/voxel/weapon/hammer_1h/wood-0.vox index e01c9aee89..c1c51c67fa 100644 --- a/assets/voxygen/voxel/weapon/hammer_1h/wood-0.vox +++ b/assets/voxygen/voxel/weapon/hammer_1h/wood-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:642174d8b77e3d500047febb9470f66b82df5920af4884d5bbc4aba4611ba518 +oid sha256:78187e87e5641bef5a27b66bb025d994a27bc24665a5b5605f5ce847b3329866 size 1816 diff --git a/assets/voxygen/voxel/weapon/sword_1h/bloodsteel-0.vox b/assets/voxygen/voxel/weapon/sword_1h/bloodsteel-0.vox index 7a23fb8293..fa8879838f 100644 --- a/assets/voxygen/voxel/weapon/sword_1h/bloodsteel-0.vox +++ b/assets/voxygen/voxel/weapon/sword_1h/bloodsteel-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75f016516a34e6aeaf58281da8905a0069e1478b0864b5c83ca41e49797860c3 +oid sha256:3a5378d752302b5a6895d12eec653b735e55a6182a911908eb2b325438859ac0 size 1348 diff --git a/assets/voxygen/voxel/weapon/sword_1h/bronze-0.vox b/assets/voxygen/voxel/weapon/sword_1h/bronze-0.vox index 1bd430ba3c..ad49f5b8f4 100644 --- a/assets/voxygen/voxel/weapon/sword_1h/bronze-0.vox +++ b/assets/voxygen/voxel/weapon/sword_1h/bronze-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1409c845b4d88ed3abe574e3c50e6e0b263c688aad021f183f35c4cb851093c +oid sha256:c894d3da920549be967024ef09811d922103066f077d9ee88966c52ed2bc41a5 size 1284 diff --git a/assets/voxygen/voxel/weapon/sword_1h/bronze-1.vox b/assets/voxygen/voxel/weapon/sword_1h/bronze-1.vox index 6d5eb7f172..68cdf6612f 100644 --- a/assets/voxygen/voxel/weapon/sword_1h/bronze-1.vox +++ b/assets/voxygen/voxel/weapon/sword_1h/bronze-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4977291be4cf152d55e3b21405309e2ed5fea8d6dd49c6e3550f6b40a6e6e5b +oid sha256:5cb4208eceb65116370902560ab33eee5177ff612b8a2738a9dfca9eabcec83c size 1308 diff --git a/assets/voxygen/voxel/weapon/sword_1h/iron-0.vox b/assets/voxygen/voxel/weapon/sword_1h/iron-0.vox index 7862e18254..037a4a4814 100644 --- a/assets/voxygen/voxel/weapon/sword_1h/iron-0.vox +++ b/assets/voxygen/voxel/weapon/sword_1h/iron-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be62bfe84b673663c9b8c039f2c4ae7c96668498d9f318e7c2951be82552b87f +oid sha256:6018d8f541ba27c4d4045eca3a1c314f50da1a4b720ba36b0d2a505b87714c14 size 1300 diff --git a/assets/voxygen/voxel/weapon/sword_1h/iron-1.vox b/assets/voxygen/voxel/weapon/sword_1h/iron-1.vox index 5c93fe60dd..f2d84332a3 100644 --- a/assets/voxygen/voxel/weapon/sword_1h/iron-1.vox +++ b/assets/voxygen/voxel/weapon/sword_1h/iron-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84efc07a12daa8ca896c1529688dc5c5db3d34ef76b0c12508a046b00e74ded8 +oid sha256:1dc13f9cf91174e3060ce3b173e269febd60b9275cf1338062fb72f82ef901ce size 1300 diff --git a/assets/voxygen/voxel/weapon/sword_1h/iron-3.vox b/assets/voxygen/voxel/weapon/sword_1h/iron-3.vox index 65fb36add4..86570915fb 100644 --- a/assets/voxygen/voxel/weapon/sword_1h/iron-3.vox +++ b/assets/voxygen/voxel/weapon/sword_1h/iron-3.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e60534ddbdb1a1e5165ef947c9e6c9cdd971b2cf9ba9ec4e46aab76b497fc97 +oid sha256:c7140cad9fbb6d6fb584394c486a70d1cf213ccf9d1bd169ece79a5d41a27538 size 1272 diff --git a/assets/voxygen/voxel/weapon/sword_1h/steel-2.vox b/assets/voxygen/voxel/weapon/sword_1h/steel-2.vox index c6177048dd..e42ce400b7 100644 --- a/assets/voxygen/voxel/weapon/sword_1h/steel-2.vox +++ b/assets/voxygen/voxel/weapon/sword_1h/steel-2.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60f82c89cd1538e7d9e3742005f9dcd386d8e20f4322d2e751675dd72949b6c4 +oid sha256:b0e78b97c583b7a68ce34bf41a8f978372f7627fe60cda908c2010ef187d7ac9 size 1332 diff --git a/voxygen/anim/src/character/alpha.rs b/voxygen/anim/src/character/alpha.rs index 7ebd7e0a43..0a4d6144a4 100644 --- a/voxygen/anim/src/character/alpha.rs +++ b/voxygen/anim/src/character/alpha.rs @@ -2,7 +2,10 @@ use super::{ super::{vek::*, Animation}, CharacterSkeleton, SkeletonAttr, }; -use common::{comp::item::ToolKind, states::utils::StageSection}; +use common::{ + comp::item::{Hands, ToolKind}, + states::utils::StageSection, +}; use std::f32::consts::PI; pub struct AlphaAnimation; @@ -11,6 +14,7 @@ impl Animation for AlphaAnimation { type Dependency = ( Option, Option, + (Option, Option), f32, f32, Option, @@ -24,7 +28,7 @@ impl Animation for AlphaAnimation { #[allow(clippy::approx_constant)] // TODO: Pending review in #587 fn update_skeleton_inner( skeleton: &Self::Skeleton, - (active_tool_kind, _second_tool_kind, _velocity, _global_time, stage_section): Self::Dependency, + (active_tool_kind, _second_tool_kind, hands, _velocity, _global_time, stage_section): Self::Dependency, anim_time: f32, rate: &mut f32, s_a: &SkeletonAttr, @@ -38,30 +42,16 @@ impl Animation for AlphaAnimation { Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), _ => (0.0, 0.0, 0.0), }; - + next.second.position = Vec3::new(0.0, 0.0, 0.0); + next.second.orientation = Quaternion::rotation_z(0.0); next.torso.position = Vec3::new(0.0, 0.0, 0.1) * s_a.scaler; next.torso.orientation = Quaternion::rotation_z(0.0); + match active_tool_kind { Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); - next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2); - next.hand_l.orientation = - Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4); - next.hand_r.position = Vec3::new(s_a.shr.0, s_a.shr.1, s_a.shr.2); - next.hand_r.orientation = - Quaternion::rotation_x(s_a.shr.3) * Quaternion::rotation_y(s_a.shr.4); - - next.control.position = Vec3::new( - s_a.sc.0, - s_a.sc.1 + move1 * -4.0 + move2 * 16.0 + move3 * -4.0, - s_a.sc.2 + move1 * 1.0, - ); - next.control.orientation = Quaternion::rotation_x(s_a.sc.3 + move1 * -0.5) - * Quaternion::rotation_y(s_a.sc.4 + move1 * -1.0 + move2 * -0.6 + move3 * 1.0) - * Quaternion::rotation_z(s_a.sc.5 + move1 * -1.2 + move2 * 1.3); - next.chest.orientation = Quaternion::rotation_z(move1 * 1.5 + (move2 * 1.75).sin() * -3.0 + move3 * 0.5); @@ -75,15 +65,10 @@ impl Animation for AlphaAnimation { next.control_l.orientation = Quaternion::rotation_x(-1.4) * Quaternion::rotation_z(1.4); }, + Some(ToolKind::Axe) => { next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); - next.hand_l.position = Vec3::new(s_a.ahl.0, s_a.ahl.1, s_a.ahl.2); - next.hand_l.orientation = - Quaternion::rotation_x(s_a.ahl.3) * Quaternion::rotation_y(s_a.ahl.4); - next.hand_r.position = Vec3::new(s_a.ahr.0, s_a.ahr.1, s_a.ahr.2); - next.hand_r.orientation = - Quaternion::rotation_x(s_a.ahr.3) * Quaternion::rotation_z(s_a.ahr.5); next.head.position = Vec3::new(0. + move2 * 2.0, s_a.head.0 + move2 * 2.0, s_a.head.1); @@ -94,20 +79,6 @@ impl Animation for AlphaAnimation { Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), _ => (0.0, 0.0, 0.0), }; - next.control.position = Vec3::new( - s_a.ac.0 + move1 * -1.0 + move2 * -2.0 + move3 * 0.0, - s_a.ac.1 + move1 * -3.0 + move2 * 3.0 + move3 * -3.5, - s_a.ac.2 + move1 * 6.0 + move2 * -15.0 + move3 * -2.0, - ); - next.control.orientation = - Quaternion::rotation_x(s_a.ac.3 + move1 * 0.0 + move2 * -3.0 + move3 * 0.4) - * Quaternion::rotation_y( - s_a.ac.4 + move1 * -0.0 + move2 * -0.6 + move3 * 0.8, - ) - * Quaternion::rotation_z( - s_a.ac.5 + move1 * -2.0 + move2 * -1.0 + move3 * 2.5, - ); - next.control.scale = Vec3::one(); next.chest.orientation = Quaternion::rotation_x(0.0 + move1 * 0.6 + move2 * -0.6 + move3 * 0.4) @@ -116,6 +87,7 @@ impl Animation for AlphaAnimation { next.head.orientation = Quaternion::rotation_z(0.0 + move1 * -1.5 + move2 * 2.5 + move3 * -1.0); }, + Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) | Some(ToolKind::Pick) => { let (move1, move2, move3) = match stage_section { Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), @@ -125,24 +97,7 @@ impl Animation for AlphaAnimation { }; next.main.position = Vec3::new(0.0, 0.0, 0.0); next.main.orientation = Quaternion::rotation_x(0.0); - next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + move2 * -7.0); - next.hand_l.orientation = - Quaternion::rotation_x(s_a.hhl.3) * Quaternion::rotation_y(s_a.hhl.4); - next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2); - next.hand_r.orientation = - Quaternion::rotation_x(s_a.hhr.3) * Quaternion::rotation_y(s_a.hhr.4); - next.control.position = Vec3::new( - s_a.hc.0 + (move1 * -13.0) * (1.0 - move3), - s_a.hc.1 + (move2 * 5.0) * (1.0 - move3), - s_a.hc.2, - ); - next.control.orientation = - Quaternion::rotation_x(s_a.hc.3 + (move1 * 1.5 + move2 * -2.5)) - * (1.0 - move3) - * Quaternion::rotation_y(s_a.hc.4 + (move1 * 1.57)) - * (1.0 - move3) - * Quaternion::rotation_z(s_a.hc.5 + (move2 * -0.5) * (1.0 - move3)); next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1); next.head.orientation = Quaternion::rotation_x((move1 * 0.1 + move2 * 0.3) * (1.0 - move3)) @@ -162,6 +117,183 @@ impl Animation for AlphaAnimation { }, _ => {}, } + + match hands { + (Some(Hands::Two), _) => match active_tool_kind { + Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2); + next.hand_l.orientation = + Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4); + next.hand_r.position = Vec3::new(s_a.shr.0, s_a.shr.1, s_a.shr.2); + next.hand_r.orientation = + Quaternion::rotation_x(s_a.shr.3) * Quaternion::rotation_y(s_a.shr.4); + + next.control.position = Vec3::new( + s_a.sc.0, + s_a.sc.1 + move1 * -4.0 + move2 * 16.0 + move3 * -4.0, + s_a.sc.2 + move1 * 1.0, + ); + next.control.orientation = Quaternion::rotation_x(s_a.sc.3 + move1 * -0.5) + * Quaternion::rotation_y( + s_a.sc.4 + move1 * -1.0 + move2 * -0.6 + move3 * 1.0, + ) + * Quaternion::rotation_z(s_a.sc.5 + move1 * -1.2 + move2 * 1.3); + }, + Some(ToolKind::Axe) => { + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Swing) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), + _ => (0.0, 0.0, 0.0), + }; + next.control.position = Vec3::new( + s_a.ac.0 + move1 * -1.0 + move2 * -2.0 + move3 * 0.0, + s_a.ac.1 + move1 * -3.0 + move2 * 3.0 + move3 * -3.5, + s_a.ac.2 + move1 * 6.0 + move2 * -15.0 + move3 * -2.0, + ); + next.control.orientation = + Quaternion::rotation_x(s_a.ac.3 + move1 * 0.0 + move2 * -3.0 + move3 * 0.4) + * Quaternion::rotation_y( + s_a.ac.4 + move1 * -0.0 + move2 * -0.6 + move3 * 0.8, + ) + * Quaternion::rotation_z( + s_a.ac.5 + move1 * -2.0 + move2 * -1.0 + move3 * 2.5, + ) + }, + Some(ToolKind::Hammer) | Some(ToolKind::HammerSimple) | Some(ToolKind::Pick) => { + let (move1, move2, move3) = match stage_section { + Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), + Some(StageSection::Swing) => (1.0, anim_time, 0.0), + Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)), + _ => (0.0, 0.0, 0.0), + }; + next.hand_l.position = + Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + move2 * -7.0); + next.hand_l.orientation = + Quaternion::rotation_x(s_a.hhl.3) * Quaternion::rotation_y(s_a.hhl.4); + next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2); + next.hand_r.orientation = + Quaternion::rotation_x(s_a.hhr.3) * Quaternion::rotation_y(s_a.hhr.4); + + next.control.position = Vec3::new( + s_a.hc.0 + (move1 * -13.0) * (1.0 - move3), + s_a.hc.1 + (move2 * 5.0) * (1.0 - move3), + s_a.hc.2, + ); + next.control.orientation = + Quaternion::rotation_x(s_a.hc.3 + (move1 * 1.5 + move2 * -2.5)) + * (1.0 - move3) + * Quaternion::rotation_y(s_a.hc.4 + (move1 * 1.57)) + * (1.0 - move3) + * Quaternion::rotation_z(s_a.hc.5 + (move2 * -0.5) * (1.0 - move3)); + }, + _ => {}, + }, + (_, _) => {}, + }; + + match hands { + (Some(Hands::One), Some(Hands::One)) | (Some(Hands::One), None) => { + match active_tool_kind { + Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + next.control_l.position = Vec3::new(-7.0, 8.0, 2.0); + next.control_l.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) + * Quaternion::rotation_y(move1 * -1.2 + move2 * -1.5) + * Quaternion::rotation_z(move2 * 1.5); + next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_l.orientation = Quaternion::rotation_x(1.57) + }, + Some(ToolKind::Axe) => { + next.control_l.position = Vec3::new( + -7.0 + move2 * 5.0, + 8.0 + move1 * 3.0 + move2 * 7.0, + 2.0 + move1 * -6.0 + move2 * 10.0, + ); + next.control_l.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) + * Quaternion::rotation_y(move1 * -1.2 + move2 * -2.5) + * Quaternion::rotation_z(move2 * 1.5); + next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_l.orientation = Quaternion::rotation_x(1.57) + }, + Some(ToolKind::Hammer) + | Some(ToolKind::HammerSimple) + | Some(ToolKind::Pick) => { + next.control_l.position = Vec3::new( + -7.0, + 8.0 + move1 * -4.0 + move2 * 4.0, + 2.0 + move1 * 16.0 + move2 * -19.0, + ); + next.control_l.orientation = + Quaternion::rotation_x(-0.3 + move1 * 1.3 + move2 * -2.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_l.orientation = Quaternion::rotation_x(1.57) + }, + + _ => {}, + } + }, + (_, _) => {}, + }; + match hands { + (Some(Hands::One), Some(Hands::One)) | (None, Some(Hands::One)) => { + match active_tool_kind { + Some(ToolKind::Sword) | Some(ToolKind::SwordSimple) => { + next.control_r.position = Vec3::new(7.0 + move2 * 8.0, 8.0, 2.0); + next.control_r.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) + * Quaternion::rotation_y(move1 * -1.8 + move2 * -1.5) + * Quaternion::rotation_z(move2 * 1.5); + next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_r.orientation = Quaternion::rotation_x(1.57) + }, + Some(ToolKind::Axe) => { + next.control_r.position = Vec3::new( + 7.0 + move2 * 5.0, + 8.0 + move1 * 3.0 + move2 * 7.0, + 2.0 + move1 * -6.0 + move2 * 8.0, + ); + next.control_r.orientation = Quaternion::rotation_x(-0.3 + move2 * 2.0) + * Quaternion::rotation_y(move1 * -1.8 + move2 * -1.5) + * Quaternion::rotation_z(move2 * 1.5); + next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_r.orientation = Quaternion::rotation_x(1.57) + }, + Some(ToolKind::Hammer) + | Some(ToolKind::HammerSimple) + | Some(ToolKind::Pick) => { + next.control_r.position = Vec3::new( + 7.0, + 8.0 + move1 * -4.0 + move2 * 4.0, + 2.0 + move1 * 16.0 + move2 * -21.0, + ); + next.control_r.orientation = + Quaternion::rotation_x(-0.3 + move1 * 1.3 + move2 * -2.3) + * Quaternion::rotation_y(0.0) + * Quaternion::rotation_z(0.0); + next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); + next.hand_r.orientation = Quaternion::rotation_x(1.57) + }, + _ => {}, + } + }, + (_, _) => {}, + }; + + 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) + }, + (_, _) => {}, + }; + 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 } } diff --git a/voxygen/anim/src/character/stand.rs b/voxygen/anim/src/character/stand.rs index ddc700c346..5b78002502 100644 --- a/voxygen/anim/src/character/stand.rs +++ b/voxygen/anim/src/character/stand.rs @@ -144,7 +144,7 @@ impl Animation for StandAnimation { next.second.scale = Vec3::one(); next.second.scale = match hands { - (Some(Hands::One), Some(Hands::One)) => Vec3::one(), + (None, Some(Hands::One)) | (Some(Hands::One), Some(Hands::One)) => Vec3::one(), (_, _) => Vec3::zero(), }; diff --git a/voxygen/anim/src/character/wield.rs b/voxygen/anim/src/character/wield.rs index d1500bf318..d1db54739c 100644 --- a/voxygen/anim/src/character/wield.rs +++ b/voxygen/anim/src/character/wield.rs @@ -97,7 +97,10 @@ impl Animation for WieldAnimation { // (Some(Hands::One), Some(Hands::One)) => Vec3::one(), // (_, _) => Vec3::zero(), // }; - + next.main.position = Vec3::new(0.0, 0.0, 0.0); + next.main.orientation = Quaternion::rotation_z(0.0); + next.second.position = Vec3::new(0.0, 0.0, 0.0); + next.second.orientation = Quaternion::rotation_z(0.0); if speed > 0.2 && velocity.z == 0.0 { next.chest.orientation = Quaternion::rotation_z(short * 0.1 + strafe * 0.7) * Quaternion::rotation_y(strafe * 0.2) @@ -342,44 +345,34 @@ impl Animation for WieldAnimation { (_, _) => {}, }; match hands { - (Some(Hands::One), _) => { - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.second.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_z(PI); - next.second.orientation = Quaternion::rotation_z(PI); - - next.control_l.position = Vec3::new(-8.0, 9.0, 4.0); + (Some(Hands::One), Some(Hands::One)) | (Some(Hands::One), None) => { + next.control_l.position = Vec3::new(-7.0, 8.0, 2.0); next.control_l.orientation = Quaternion::rotation_x(-0.3); - next.hand_l.position = Vec3::new(0.0, 0.5, -4.0); + next.hand_l.position = Vec3::new(0.0, -0.5, 0.0); next.hand_l.orientation = Quaternion::rotation_x(1.57) }, (_, _) => {}, }; match hands { - (_, Some(Hands::One)) => { - next.main.position = Vec3::new(0.0, 0.0, 0.0); - next.second.position = Vec3::new(0.0, 0.0, 0.0); - next.main.orientation = Quaternion::rotation_z(PI); - next.second.orientation = Quaternion::rotation_z(PI); - - next.control_r.position = Vec3::new(8.0, 9.0, 4.0); + (Some(Hands::One), Some(Hands::One)) | (None, Some(Hands::One)) => { + next.control_r.position = Vec3::new(7.0, 8.0, 2.0); next.control_r.orientation = Quaternion::rotation_x(-0.3); - - next.hand_r.position = Vec3::new(0.0, 0.5, -4.0); + next.hand_r.position = Vec3::new(0.0, -0.5, 0.0); next.hand_r.orientation = Quaternion::rotation_x(1.57) }, (_, _) => {}, }; match hands { - (None, _) => { - next.hand_l.position = Vec3::new(0.0, 0.0, 20.0); + (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) }, (_, _) => {}, }; - match hands { - (_, None) => { - next.hand_r.position = Vec3::new(0.0, 0.0, 20.0); + (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) }, (_, _) => {}, }; diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 4ccb63e590..1f7d7b1738 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -899,6 +899,7 @@ impl FigureMgr { ( active_tool_kind, second_tool_kind, + hands, rel_vel.magnitude(), time, Some(s.stage_section), @@ -1057,6 +1058,7 @@ impl FigureMgr { ( active_tool_kind, second_tool_kind, + hands, rel_vel.magnitude(), time, None, @@ -1361,6 +1363,7 @@ impl FigureMgr { ( active_tool_kind, second_tool_kind, + hands, rel_vel.magnitude(), time, Some(s.stage_section),