From 5b518b137cc9de034a272a9eb4c0cffda7f902a7 Mon Sep 17 00:00:00 2001 From: jshipsey Date: Fri, 8 May 2020 01:00:12 -0400 Subject: [PATCH] skeletal tweaks --- voxygen/src/anim/dragon/idle.rs | 8 +++--- voxygen/src/anim/dragon/mod.rs | 48 ++++++++++++++++----------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/voxygen/src/anim/dragon/idle.rs b/voxygen/src/anim/dragon/idle.rs index 0557bef6ec..ecc2f29404 100644 --- a/voxygen/src/anim/dragon/idle.rs +++ b/voxygen/src/anim/dragon/idle.rs @@ -90,7 +90,7 @@ impl Animation for IdleAnimation { skeleton_attr.wing_in.1, skeleton_attr.wing_in.2, ); - next.wing_in_l.ori = Quaternion::rotation_z(0.0); + next.wing_in_l.ori = Quaternion::rotation_y(wave_ultra_slow * -0.5); next.wing_in_l.scale = Vec3::one() * 1.05; next.wing_in_r.offset = Vec3::new( @@ -98,7 +98,7 @@ impl Animation for IdleAnimation { skeleton_attr.wing_in.1, skeleton_attr.wing_in.2, ); - next.wing_in_r.ori = Quaternion::rotation_y(0.0); + next.wing_in_r.ori = Quaternion::rotation_y(wave_ultra_slow * 0.5); next.wing_in_r.scale = Vec3::one() * 1.05; next.wing_out_l.offset = Vec3::new( @@ -106,7 +106,7 @@ impl Animation for IdleAnimation { skeleton_attr.wing_out.1, skeleton_attr.wing_out.2, ); - next.wing_out_l.ori = Quaternion::rotation_z(0.0); + next.wing_out_l.ori = Quaternion::rotation_y(wave_ultra_slow * -0.5); next.wing_out_l.scale = Vec3::one() * 1.05; next.wing_out_r.offset = Vec3::new( @@ -114,7 +114,7 @@ impl Animation for IdleAnimation { skeleton_attr.wing_out.1, skeleton_attr.wing_out.2, ); - next.wing_out_r.ori = Quaternion::rotation_y(0.0); + next.wing_out_r.ori = Quaternion::rotation_y(wave_ultra_slow * 0.5); next.wing_out_r.scale = Vec3::one() * 1.05; next.foot_fl.offset = Vec3::new( diff --git a/voxygen/src/anim/dragon/mod.rs b/voxygen/src/anim/dragon/mod.rs index 63db3aaee8..393b85c9b2 100644 --- a/voxygen/src/anim/dragon/mod.rs +++ b/voxygen/src/anim/dragon/mod.rs @@ -11,13 +11,13 @@ use common::comp::{self}; use vek::Vec3; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const HEAD_UPPER_X: f32 = 11.5; +const HEAD_UPPER_X: f32 = 2.5; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const HEAD_UPPER_Z: f32 = 18.0; +const HEAD_UPPER_Z: f32 = 4.5; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const HEAD_LOWER_X: f32 = -4.0; +const HEAD_LOWER_X: f32 = 8.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const HEAD_LOWER_Z: f32 = -2.0; +const HEAD_LOWER_Z: f32 = 3.5; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] const JAW_X: f32 = 7.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] @@ -31,25 +31,25 @@ const CHEST_R_X: f32 = -13.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] const CHEST_R_Z: f32 = 0.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const TAIL_F_X: f32 = -13.5; +const TAIL_F_X: f32 = -12.5; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const TAIL_F_Z: f32 = 16.5; +const TAIL_F_Z: f32 = 1.5; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const TAIL_R_X: f32 = -28.0; +const TAIL_R_X: f32 = -30.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const TAIL_R_Z: f32 = 0.0; +const TAIL_R_Z: f32 = 14.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_IN_X: f32 = 10.0; +const WING_IN_X: f32 = 2.5; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_IN_Y: f32 = -28.5; +const WING_IN_Y: f32 = -16.5; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_IN_Z: f32 = 6.0; +const WING_IN_Z: f32 = 3.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_OUT_X: f32 = 1.0; +const WING_OUT_X: f32 = 23.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_OUT_Y: f32 = 2.0; +const WING_OUT_Y: f32 = 0.5; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] -const WING_OUT_Z: f32 = 12.0; +const WING_OUT_Z: f32 = 4.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] const FEET_F_X: f32 = 4.0; #[const_tweaker::tweak(min = -40.0, max = 40.0, step = 0.5)] @@ -89,7 +89,7 @@ impl DragonSkeleton { impl Skeleton for DragonSkeleton { type Attr = SkeletonAttr; - fn bone_count(&self) -> usize { 13 } + fn bone_count(&self) -> usize { 15 } <<<<<<< HEAD fn compute_matrices(&self) -> ([FigureBoneData; 16], Vec3) { @@ -128,17 +128,17 @@ impl Skeleton for DragonSkeleton { ) ======= [ - FigureBoneData::new(head_upper_mat), - FigureBoneData::new(head_upper_mat * head_lower_mat), - FigureBoneData::new(head_upper_mat * self.jaw.compute_base_matrix()), + FigureBoneData::new(chest_front_mat * head_lower_mat*head_upper_mat), + FigureBoneData::new(chest_front_mat * head_lower_mat), + FigureBoneData::new(chest_front_mat * head_lower_mat*head_upper_mat * self.jaw.compute_base_matrix()), FigureBoneData::new(chest_front_mat), - FigureBoneData::new(self.chest_rear.compute_base_matrix() * chest_front_mat), - FigureBoneData::new(chest_rear_mat * self.tail_front.compute_base_matrix()), + FigureBoneData::new(chest_front_mat * self.chest_rear.compute_base_matrix() ), + FigureBoneData::new(chest_front_mat*chest_rear_mat * tail_front_mat), FigureBoneData::new(self.tail_rear.compute_base_matrix() * tail_front_mat), FigureBoneData::new(chest_front_mat * self.wing_in_l.compute_base_matrix()), FigureBoneData::new(chest_front_mat * self.wing_in_r.compute_base_matrix()), - FigureBoneData::new(self.wing_out_l.compute_base_matrix() * wing_in_l_mat), - FigureBoneData::new(self.wing_out_r.compute_base_matrix() * wing_in_r_mat), + FigureBoneData::new(chest_front_mat*wing_in_l_mat*self.wing_out_l.compute_base_matrix()), + FigureBoneData::new(chest_front_mat*wing_in_r_mat*self.wing_out_r.compute_base_matrix()), FigureBoneData::new(self.foot_fl.compute_base_matrix()), FigureBoneData::new(self.foot_fr.compute_base_matrix()), FigureBoneData::new(self.foot_bl.compute_base_matrix()), @@ -244,10 +244,10 @@ impl<'a> From<&'a comp::dragon::Body> for SkeletonAttr { (Reddragon, _) => (*WING_OUT_X, *WING_OUT_Y, *WING_OUT_Z), }, feet_f: match (body.species, body.body_type) { - (Reddragon, _) => (*FEET_F_X, *FEET_F_Y, *FEET_F_Z), + (Reddragon, _) => (4.0, 0.0, 1.5), }, feet_b: match (body.species, body.body_type) { - (Reddragon, _) => (*FEET_B_X, *FEET_B_Y, *FEET_B_Z), + (Reddragon, _) => (4.0, -15.0, 3.0), }, height: match (body.species, body.body_type) { (Reddragon, _) => (1.0),