From f48fea57f43d2dd5a867d4cec42ce88c59e3ade2 Mon Sep 17 00:00:00 2001 From: Snowram Date: Sun, 27 Dec 2020 16:01:02 +0100 Subject: [PATCH] Sahagin, Adlet npcs --- assets/common/npc_names.ron | 8 ++ .../voxel/biped_small_central_manifest.ron | 88 +++++++++++++++++++ .../voxel/biped_small_lateral_manifest.ron | 72 +++++++++++++++ assets/voxygen/voxel/npc/adlet/male/chest.vox | 3 + .../voxygen/voxel/npc/adlet/male/foot_l.vox | 3 + .../voxygen/voxel/npc/adlet/male/foot_r.vox | 3 + .../voxygen/voxel/npc/adlet/male/hand_l.vox | 3 + .../voxygen/voxel/npc/adlet/male/hand_r.vox | 3 + assets/voxygen/voxel/npc/adlet/male/head.vox | 3 + .../voxygen/voxel/npc/adlet/male/shorts.vox | 3 + assets/voxygen/voxel/npc/adlet/male/tail.vox | 3 + .../voxygen/voxel/npc/sahagin/male/chest.vox | 3 + .../voxygen/voxel/npc/sahagin/male/foot_l.vox | 3 + .../voxygen/voxel/npc/sahagin/male/foot_r.vox | 3 + .../voxygen/voxel/npc/sahagin/male/hand_l.vox | 3 + .../voxygen/voxel/npc/sahagin/male/hand_r.vox | 3 + .../voxygen/voxel/npc/sahagin/male/head.vox | 3 + .../voxygen/voxel/npc/sahagin/male/shorts.vox | 3 + .../voxygen/voxel/npc/sahagin/male/tail.vox | 3 + .../voxel/weapon/npcweapon/cyclops_hammer.vox | 3 - assets/voxygen/voxel/weapon/spear/adlet.vox | 3 + assets/voxygen/voxel/weapon/spear/sahagin.vox | 3 + common/src/comp/body.rs | 2 +- common/src/comp/body/biped_small.rs | 12 ++- voxygen/anim/src/biped_small/mod.rs | 12 +++ voxygen/anim/src/biped_small/run.rs | 52 +++++------ 26 files changed, 272 insertions(+), 31 deletions(-) create mode 100644 assets/voxygen/voxel/npc/adlet/male/chest.vox create mode 100644 assets/voxygen/voxel/npc/adlet/male/foot_l.vox create mode 100644 assets/voxygen/voxel/npc/adlet/male/foot_r.vox create mode 100644 assets/voxygen/voxel/npc/adlet/male/hand_l.vox create mode 100644 assets/voxygen/voxel/npc/adlet/male/hand_r.vox create mode 100644 assets/voxygen/voxel/npc/adlet/male/head.vox create mode 100644 assets/voxygen/voxel/npc/adlet/male/shorts.vox create mode 100644 assets/voxygen/voxel/npc/adlet/male/tail.vox create mode 100644 assets/voxygen/voxel/npc/sahagin/male/chest.vox create mode 100644 assets/voxygen/voxel/npc/sahagin/male/foot_l.vox create mode 100644 assets/voxygen/voxel/npc/sahagin/male/foot_r.vox create mode 100644 assets/voxygen/voxel/npc/sahagin/male/hand_l.vox create mode 100644 assets/voxygen/voxel/npc/sahagin/male/hand_r.vox create mode 100644 assets/voxygen/voxel/npc/sahagin/male/head.vox create mode 100644 assets/voxygen/voxel/npc/sahagin/male/shorts.vox create mode 100644 assets/voxygen/voxel/npc/sahagin/male/tail.vox delete mode 100644 assets/voxygen/voxel/weapon/npcweapon/cyclops_hammer.vox create mode 100644 assets/voxygen/voxel/weapon/spear/adlet.vox create mode 100644 assets/voxygen/voxel/weapon/spear/sahagin.vox diff --git a/assets/common/npc_names.ron b/assets/common/npc_names.ron index 0e93b93ccc..e08840b6d4 100644 --- a/assets/common/npc_names.ron +++ b/assets/common/npc_names.ron @@ -892,6 +892,14 @@ gnome: ( keyword: "gnome", generic: "Gnome" + ), + sahagin: ( + keyword: "sahagin", + generic: "Sahagin" + ), + adlet: ( + keyword: "adlet", + generic: "Adlet" ) ) ), diff --git a/assets/voxygen/voxel/biped_small_central_manifest.ron b/assets/voxygen/voxel/biped_small_central_manifest.ron index 9b325d72bc..86d077e456 100644 --- a/assets/voxygen/voxel/biped_small_central_manifest.ron +++ b/assets/voxygen/voxel/biped_small_central_manifest.ron @@ -43,4 +43,92 @@ central: ("armor.empty"), ), ), + (Sahagin, Male): ( + head: ( + offset: (-2.5, 0.0, -4.5), + central: ("npc.sahagin.male.head"), + ), + chest: ( + offset: (-4.5, -8.0, -8.0), + central: ("npc.sahagin.male.chest"), + ), + shorts: ( + offset: (-2.5, -3.5, -2.0), + central: ("npc.sahagin.male.shorts"), + ), + tail: ( + offset: (-1.5, -13.0, -5.0), + central: ("npc.sahagin.male.tail"), + ), + main: ( + offset: (-0.5, -7.5, -5.0), + central: ("weapon.spear.sahagin"), + ), + ), + (Sahagin, Female): ( + head: ( + offset: (-2.5, 0.0, -4.5), + central: ("npc.sahagin.male.head"), + ), + chest: ( + offset: (-4.5, -8.0, -8.0), + central: ("npc.sahagin.male.chest"), + ), + shorts: ( + offset: (-2.5, -3.5, -2.0), + central: ("npc.sahagin.male.shorts"), + ), + tail: ( + offset: (-1.5, -13.0, -5.0), + central: ("npc.sahagin.male.tail"), + ), + main: ( + offset: (-0.5, -7.5, -5.0), + central: ("weapon.spear.sahagin"), + ), + ), + (Adlet, Male): ( + head: ( + offset: (-7.0, -4.5, -6.0), + central: ("npc.adlet.male.head"), + ), + chest: ( + offset: (-5.0, -3.5, -2.0), + central: ("npc.adlet.male.chest"), + ), + shorts: ( + offset: (-5.0, -4.5, -3.0), + central: ("npc.adlet.male.shorts"), + ), + tail: ( + offset: (-1.0, -5.0, -1.0), + central: ("npc.adlet.male.tail"), + ), + main: ( + offset: (-0.5, -7.5, -5.0), + central: ("weapon.spear.adlet"), + ), + ), + (Adlet, Female): ( + head: ( + offset: (-7.0, -4.5, -6.0), + central: ("npc.adlet.male.head"), + ), + chest: ( + offset: (-5.0, -3.5, -2.0), + central: ("npc.adlet.male.chest"), + ), + shorts: ( + offset: (-5.0, -4.5, -3.0), + central: ("npc.adlet.male.shorts"), + ), + tail: ( + offset: (-1.0, -5.0, -1.0), + central: ("npc.adlet.male.tail"), + ), + main: ( + offset: (-0.5, -7.5, -5.0), + central: ("weapon.spear.adlet"), + ), + ), }) diff --git a/assets/voxygen/voxel/biped_small_lateral_manifest.ron b/assets/voxygen/voxel/biped_small_lateral_manifest.ron index aa2ddba155..edca8bc940 100644 --- a/assets/voxygen/voxel/biped_small_lateral_manifest.ron +++ b/assets/voxygen/voxel/biped_small_lateral_manifest.ron @@ -35,4 +35,76 @@ lateral: ("npc.gnome.male.foot_r"), ), ), + (Sahagin, Male): ( + hand_l: ( + offset: (0.0, -2.5, -11.0), + lateral: ("npc.sahagin.male.hand_l"), + ), + hand_r: ( + offset: (-7.0, -2.5, -11.0), + lateral: ("npc.sahagin.male.hand_r"), + ), + foot_l: ( + offset: (-2.5, -2.0, -8.0), + lateral: ("npc.sahagin.male.foot_l"), + ), + foot_r: ( + offset: (-2.5, -2.0, -8.0), + lateral: ("npc.sahagin.male.foot_r"), + ), + ), + (Sahagin, Female): ( + hand_l: ( + offset: (0.0, -2.5, -11.0), + lateral: ("npc.sahagin.male.hand_l"), + ), + hand_r: ( + offset: (-7.0, -2.5, -11.0), + lateral: ("npc.sahagin.male.hand_r"), + ), + foot_l: ( + offset: (-2.5, -2.0, -8.0), + lateral: ("npc.sahagin.male.foot_l"), + ), + foot_r: ( + offset: (-2.5, -2.0, -8.0), + lateral: ("npc.sahagin.male.foot_r"), + ), + ), + (Adlet, Male): ( + hand_l: ( + offset: (-2.0, -2.0, -6.0), + lateral: ("npc.adlet.male.hand_l"), + ), + hand_r: ( + offset: (-2.0, -2.0, -6.0), + lateral: ("npc.adlet.male.hand_r"), + ), + foot_l: ( + offset: (-1.5, -3.0, -7.0), + lateral: ("npc.adlet.male.foot_l"), + ), + foot_r: ( + offset: (-1.5, -3.0, -7.0), + lateral: ("npc.adlet.male.foot_r"), + ), + ), + (Adlet, Female): ( + hand_l: ( + offset: (-2.0, -2.0, -6.0), + lateral: ("npc.adlet.male.hand_l"), + ), + hand_r: ( + offset: (-2.0, -2.0, -6.0), + lateral: ("npc.adlet.male.hand_r"), + ), + foot_l: ( + offset: (-1.5, -3.0, -7.0), + lateral: ("npc.adlet.male.foot_l"), + ), + foot_r: ( + offset: (-1.5, -3.0, -7.0), + lateral: ("npc.adlet.male.foot_r"), + ), + ), }) diff --git a/assets/voxygen/voxel/npc/adlet/male/chest.vox b/assets/voxygen/voxel/npc/adlet/male/chest.vox new file mode 100644 index 0000000000..5ba90ecd91 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/male/chest.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed21307a67cc28e6aafa5bf2ce6ee4a4752008e60fbc8548440f4e6a97490490 +size 1688 diff --git a/assets/voxygen/voxel/npc/adlet/male/foot_l.vox b/assets/voxygen/voxel/npc/adlet/male/foot_l.vox new file mode 100644 index 0000000000..02dda8f8f3 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/male/foot_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fff771288bd843ba433f8f9c7eb855452480b8710d5021d2ee022a471f4def20 +size 1304 diff --git a/assets/voxygen/voxel/npc/adlet/male/foot_r.vox b/assets/voxygen/voxel/npc/adlet/male/foot_r.vox new file mode 100644 index 0000000000..fd9a64bc1d --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/male/foot_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec5b001f718eeaba782262f84ddb375ead7a62fd2fe19b2bba3c1a39f3404a16 +size 1304 diff --git a/assets/voxygen/voxel/npc/adlet/male/hand_l.vox b/assets/voxygen/voxel/npc/adlet/male/hand_l.vox new file mode 100644 index 0000000000..4752784440 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/male/hand_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6107b1f4789e6479d1340aa45713be40d705a7a6e8f93a2081336d72197021a9 +size 1420 diff --git a/assets/voxygen/voxel/npc/adlet/male/hand_r.vox b/assets/voxygen/voxel/npc/adlet/male/hand_r.vox new file mode 100644 index 0000000000..bff8a36769 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/male/hand_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe3cee39cf25b7be4cbca9e6a6fa0d7f9629b71c91b1b393e8cc074555f5609b +size 1420 diff --git a/assets/voxygen/voxel/npc/adlet/male/head.vox b/assets/voxygen/voxel/npc/adlet/male/head.vox new file mode 100644 index 0000000000..26a71c9cec --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/male/head.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a936f5a25ab1b9dcc72f7824b00b743ae7866822cfc4764238bfa9419a5d9a0f +size 3336 diff --git a/assets/voxygen/voxel/npc/adlet/male/shorts.vox b/assets/voxygen/voxel/npc/adlet/male/shorts.vox new file mode 100644 index 0000000000..8cbfbfde97 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/male/shorts.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45ad1cf02069507286e9e45ae1a3f9a5739653b86ba40cd2327cfc833c1e9b7a +size 1904 diff --git a/assets/voxygen/voxel/npc/adlet/male/tail.vox b/assets/voxygen/voxel/npc/adlet/male/tail.vox new file mode 100644 index 0000000000..f4cf97a571 --- /dev/null +++ b/assets/voxygen/voxel/npc/adlet/male/tail.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:558e995b6496a667225c1b6083a986c1d975c71afed60fe52c88b95d33f5839d +size 1232 diff --git a/assets/voxygen/voxel/npc/sahagin/male/chest.vox b/assets/voxygen/voxel/npc/sahagin/male/chest.vox new file mode 100644 index 0000000000..357523d8bd --- /dev/null +++ b/assets/voxygen/voxel/npc/sahagin/male/chest.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc352e09cf8794c2bba919f140cca1f7cca2711185007967f7f0be15edc064d3 +size 2940 diff --git a/assets/voxygen/voxel/npc/sahagin/male/foot_l.vox b/assets/voxygen/voxel/npc/sahagin/male/foot_l.vox new file mode 100644 index 0000000000..c006778a48 --- /dev/null +++ b/assets/voxygen/voxel/npc/sahagin/male/foot_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6d6e8aa6875db50d7c60899704d28dcdf8a4cfd23ce5fb1786029c84b9be86f +size 1308 diff --git a/assets/voxygen/voxel/npc/sahagin/male/foot_r.vox b/assets/voxygen/voxel/npc/sahagin/male/foot_r.vox new file mode 100644 index 0000000000..6e7a0d105a --- /dev/null +++ b/assets/voxygen/voxel/npc/sahagin/male/foot_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26c13cb8d7bfaa16392289306c9d756478842deb9a697f883162fc4a484738bb +size 1308 diff --git a/assets/voxygen/voxel/npc/sahagin/male/hand_l.vox b/assets/voxygen/voxel/npc/sahagin/male/hand_l.vox new file mode 100644 index 0000000000..7a47b5201e --- /dev/null +++ b/assets/voxygen/voxel/npc/sahagin/male/hand_l.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b04d6c515c659c5aecd2c58ee5ca1611a4f5f185a9c9eecd5bb668de756e09b +size 1476 diff --git a/assets/voxygen/voxel/npc/sahagin/male/hand_r.vox b/assets/voxygen/voxel/npc/sahagin/male/hand_r.vox new file mode 100644 index 0000000000..143f5acd6d --- /dev/null +++ b/assets/voxygen/voxel/npc/sahagin/male/hand_r.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1467f658d9b07186a84b87a3a165653d8fc1f898fa28f4ee8582c25935df4a73 +size 1476 diff --git a/assets/voxygen/voxel/npc/sahagin/male/head.vox b/assets/voxygen/voxel/npc/sahagin/male/head.vox new file mode 100644 index 0000000000..505ea421b7 --- /dev/null +++ b/assets/voxygen/voxel/npc/sahagin/male/head.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aad1c94c98c966d2c419dcda9b1bd071e678e3c6ad18e9f0772c08672846d14c +size 1880 diff --git a/assets/voxygen/voxel/npc/sahagin/male/shorts.vox b/assets/voxygen/voxel/npc/sahagin/male/shorts.vox new file mode 100644 index 0000000000..a48214f36f --- /dev/null +++ b/assets/voxygen/voxel/npc/sahagin/male/shorts.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5720aee2e2d8cd40f6cd3014cd557f02f6050fbad180288f4088fe1aa62f9643 +size 1432 diff --git a/assets/voxygen/voxel/npc/sahagin/male/tail.vox b/assets/voxygen/voxel/npc/sahagin/male/tail.vox new file mode 100644 index 0000000000..882c6aed76 --- /dev/null +++ b/assets/voxygen/voxel/npc/sahagin/male/tail.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6de1a8e65358dc9787a3c5b73cebf42f30abaf540f8e54eb5cde03eab48b90b +size 1400 diff --git a/assets/voxygen/voxel/weapon/npcweapon/cyclops_hammer.vox b/assets/voxygen/voxel/weapon/npcweapon/cyclops_hammer.vox deleted file mode 100644 index 93bf3d1752..0000000000 --- a/assets/voxygen/voxel/weapon/npcweapon/cyclops_hammer.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef11b80feaf3144e07c4779baa8eaf248e4311e3c927e050193f254ff7136111 -size 29267 diff --git a/assets/voxygen/voxel/weapon/spear/adlet.vox b/assets/voxygen/voxel/weapon/spear/adlet.vox new file mode 100644 index 0000000000..fdd2d0bd3e --- /dev/null +++ b/assets/voxygen/voxel/weapon/spear/adlet.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c691f98dee4882cbca0e81ca89998259369f55c49b03b6f43d5b546d69b93bc8 +size 1288 diff --git a/assets/voxygen/voxel/weapon/spear/sahagin.vox b/assets/voxygen/voxel/weapon/spear/sahagin.vox new file mode 100644 index 0000000000..fe093f417d --- /dev/null +++ b/assets/voxygen/voxel/weapon/spear/sahagin.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf6d16fca51e28ab79b779428bec61032558224cc890b96caba0459f078c96d9 +size 1308 diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index a25f9ff89e..edcc366654 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -268,7 +268,7 @@ impl Body { _ => 4.6, }, Body::Golem(_) => 5.0, - Body::BipedSmall(_) => 1.5, + Body::BipedSmall(_) => 1.4, Body::Object(object) => match object { object::Body::Crossbow => 1.7, _ => 1.0, diff --git a/common/src/comp/body/biped_small.rs b/common/src/comp/body/biped_small.rs index 85950c8d20..7fd14af32d 100644 --- a/common/src/comp/body/biped_small.rs +++ b/common/src/comp/body/biped_small.rs @@ -35,6 +35,8 @@ make_case_elim!( #[repr(u32)] pub enum Species { Gnome = 0, + Sahagin = 1, + Adlet = 2, } ); @@ -44,6 +46,8 @@ make_case_elim!( #[derive(Clone, Debug, Deserialize)] pub struct AllSpecies { pub gnome: SpeciesMeta, + pub sahagin: SpeciesMeta, + pub adlet: SpeciesMeta, } impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies { @@ -53,11 +57,17 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies fn index(&self, &index: &'a Species) -> &Self::Output { match index { Species::Gnome => &self.gnome, + Species::Sahagin => &self.sahagin, + Species::Adlet => &self.adlet, } } } -pub const ALL_SPECIES: [Species; 1] = [Species::Gnome]; +pub const ALL_SPECIES: [Species; 3] = [ + Species::Gnome, + Species::Sahagin, + Species::Adlet, +]; impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies { type IntoIter = std::iter::Copied>; diff --git a/voxygen/anim/src/biped_small/mod.rs b/voxygen/anim/src/biped_small/mod.rs index 73c22b02f3..2a23083043 100644 --- a/voxygen/anim/src/biped_small/mod.rs +++ b/voxygen/anim/src/biped_small/mod.rs @@ -93,21 +93,33 @@ impl<'a> From<&'a Body> for SkeletonAttr { Self { head: match (body.species, body.body_type) { (Gnome, _) => (-1.0, 9.0), + (Sahagin, _) => (7.0, -3.5), + (Adlet, _) => (0.0, 7.0), }, chest: match (body.species, body.body_type) { (Gnome, _) => (0.0, 9.0), + (Sahagin, _) => (0.0, 15.0), + (Adlet, _) => (0.0, 11.0), }, shorts: match (body.species, body.body_type) { (Gnome, _) => (0.0, -3.0), + (Sahagin, _) => (0.5, -7.0), + (Adlet, _) => (0.0, -3.0), }, tail: match (body.species, body.body_type) { (Gnome, _) => (0.0, 0.0), + (Sahagin, _) => (-2.5, -2.0), + (Adlet, _) => (-4.5, -2.0), }, hand: match (body.species, body.body_type) { (Gnome, _) => (6.0, 0.5, -1.0), + (Sahagin, _) => (9.5, 3.5, -2.0), + (Adlet, _) => (6.0, -0.5, 0.0), }, foot: match (body.species, body.body_type) { (Gnome, _) => (3.0, 0.0, 4.0), + (Sahagin, _) => (3.0, 1.0, 8.0), + (Adlet, _) => (3.0, 0.5, 7.0), }, } } diff --git a/voxygen/anim/src/biped_small/run.rs b/voxygen/anim/src/biped_small/run.rs index 7afb3e20d8..20e4f88c0b 100644 --- a/voxygen/anim/src/biped_small/run.rs +++ b/voxygen/anim/src/biped_small/run.rs @@ -32,32 +32,32 @@ impl Animation for RunAnimation { let lab = 1.0; - let footrotl = (((1.0) - / (0.5 + (0.5) * ((acc_vel * 1.6 * lab as f32 + PI * 1.4).sin()).powi(2))) + let footrotl = (((5.0) + / (0.5 + (5.5) * ((acc_vel * 1.4 * lab as f32 + PI * 1.4).sin()).powi(2))) .sqrt()) - * ((acc_vel * 1.6 * lab as f32 + PI * 1.4).sin()); + * ((acc_vel * 1.4 * lab as f32 + PI * 1.4).sin()); - let footrotr = (((1.0) - / (0.5 + (0.5) * ((acc_vel * 1.6 * lab as f32 + PI * 0.4).sin()).powi(2))) + let footrotr = (((5.0) + / (0.5 + (5.5) * ((acc_vel * 1.4 * lab as f32 + PI * 0.4).sin()).powi(2))) .sqrt()) - * ((acc_vel * 1.6 * lab as f32 + PI * 0.4).sin()); + * ((acc_vel * 1.4 * lab as f32 + PI * 0.4).sin()); - let shortalter = (acc_vel * lab as f32 * 1.6 + PI / -2.0).sin(); + let shortalter = (acc_vel * lab as f32 * 1.4 + PI / -2.0).sin(); - let foothoril = (acc_vel * 1.6 * lab as f32 + PI * 1.45).sin(); - let foothorir = (acc_vel * 1.6 * lab as f32 + PI * (0.45)).sin(); - let footstrafel = (acc_vel * 1.6 * lab as f32 + PI * 1.45).sin(); - let footstrafer = (acc_vel * 1.6 * lab as f32 + PI * (0.95)).sin(); + let foothoril = (acc_vel * 1.4 * lab as f32 + PI * 1.45).sin(); + let foothorir = (acc_vel * 1.4 * lab as f32 + PI * (0.45)).sin(); + let footstrafel = (acc_vel * 1.4 * lab as f32 + PI * 1.45).sin(); + let footstrafer = (acc_vel * 1.4 * lab as f32 + PI * (0.95)).sin(); - let footvertl = (acc_vel * 1.6 * lab as f32).sin(); - let footvertr = (acc_vel * 1.6 * lab as f32 + PI).sin(); - let footvertsl = (acc_vel * 1.6 * lab as f32).sin(); - let footvertsr = (acc_vel * 1.6 * lab as f32 + PI * 0.5).sin(); + let footvertl = (acc_vel * 1.4 * lab as f32).sin(); + let footvertr = (acc_vel * 1.4 * lab as f32 + PI).sin(); + let footvertsl = (acc_vel * 1.4 * lab as f32).sin(); + let footvertsr = (acc_vel * 1.4 * lab as f32 + PI * 0.5).sin(); - let shortalt = (acc_vel * lab as f32 * 1.6 + PI / 2.0).sin(); + let shortalt = (acc_vel * lab as f32 * 1.4 + PI / 2.0).sin(); - let short = (((5.0) / (1.5 + 3.5 * ((acc_vel * lab as f32 * 1.6).sin()).powi(2))).sqrt()) - * ((acc_vel * lab as f32 * 1.6).sin()); + let short = (((5.0) / (1.5 + 3.5 * ((acc_vel * lab as f32 * 1.4).sin()).powi(2))).sqrt()) + * ((acc_vel * lab as f32 * 1.4).sin()); let direction = velocity.y * -0.098 * orientation.y + velocity.x * -0.098 * orientation.x; let side = @@ -115,18 +115,18 @@ impl Animation for RunAnimation { * Quaternion::rotation_y(tilt * 0.7); next.hand_l.position = Vec3::new( - -s_a.hand.0 + foothorir * -1.3 * speednorm, - 1.0 * speednorm + s_a.hand.1 + foothorir * -3.5 * speednorm, - 1.5 * speednorm + s_a.hand.2 - foothorir * 2.5 * speednorm, + -s_a.hand.0 + footrotr * -1.3 * speednorm, + 1.0 * speednorm + s_a.hand.1 + footrotr * -3.5 * speednorm, + 1.5 * speednorm + s_a.hand.2 - footrotr * 2.5 * speednorm, ); next.hand_l.orientation = Quaternion::rotation_x(0.4 * speednorm + (footrotr * -1.2) * speednorm) * Quaternion::rotation_y(footrotr * 0.4 * speednorm); next.hand_r.position = Vec3::new( - s_a.hand.0 + foothoril * 1.3 * speednorm, - 1.0 * speednorm + s_a.hand.1 + foothoril * -3.5 * speednorm, - 1.5 * speednorm + s_a.hand.2 - foothoril * 2.5 * speednorm, + s_a.hand.0 + footrotl * 1.3 * speednorm, + 1.0 * speednorm + s_a.hand.1 + footrotl * -3.5 * speednorm, + 1.5 * speednorm + s_a.hand.2 - footrotl * 2.5 * speednorm, ); next.hand_r.orientation = Quaternion::rotation_x(0.4 * speednorm + (footrotl * -1.2) * speednorm) @@ -136,7 +136,7 @@ impl Animation for RunAnimation { next.foot_l.position = Vec3::new( -s_a.foot.0 + footstrafel * sideabs * 3.0 + tilt * -2.0, s_a.foot.1 - + (1.0 - sideabs) * (-1.0 * speednorm + foothoril * -7.5 * speednorm) + + (1.0 - sideabs) * (-1.0 * speednorm + footrotl * -7.5 * speednorm) + (direction * 5.0).max(0.0), s_a.foot.2 + (1.0 - sideabs) * (2.0 * speednorm + ((footvertl * -2.1 * speednorm).max(-1.0))) @@ -151,7 +151,7 @@ impl Animation for RunAnimation { next.foot_r.position = Vec3::new( s_a.foot.0 + footstrafer * sideabs * 3.0 + tilt * -2.0, s_a.foot.1 - + (1.0 - sideabs) * (-1.0 * speednorm + foothorir * -7.5 * speednorm) + + (1.0 - sideabs) * (-1.0 * speednorm + footrotr * -7.5 * speednorm) + (direction * 5.0).max(0.0), s_a.foot.2 + (1.0 - sideabs) * (2.0 * speednorm + ((footvertr * -2.1 * speednorm).max(-1.0)))