animation tweaks, fix some idle

This commit is contained in:
jshipsey 2020-06-26 18:32:41 -04:00
parent db64972e42
commit 03c1a97ba9
6 changed files with 127 additions and 127 deletions

View File

@ -13,11 +13,11 @@
central: ("npc.grolgar.male.jaw"),
),
torso_front: (
offset: (-7.0, -14.0, -8.0),
offset: (-7.0, -14.0, -8.0),//value in y dimension is full length of model
central: ("npc.grolgar.male.torso_front"),
),
torso_back: (
offset: (-5.0, -6.0, -5.5),
offset: (-5.0, -12.0, -5.5),//value in y dimension is full length of model
central: ("npc.grolgar.male.torso_back"),
),
ears: (
@ -47,7 +47,7 @@
central: ("npc.grolgar.female.torso_front"),
),
torso_back: (
offset: (-5.0, -6.0, -5.5),
offset: (-5.0, -12.0, -5.5),
central: ("npc.grolgar.female.torso_back"),
),
ears: (
@ -77,7 +77,7 @@
central: ("npc.saber.male.torso_front"),
),
torso_back: (
offset: (-5.0, -6.0, -5.0),
offset: (-5.0, -12.0, -5.0),
central: ("npc.saber.male.torso_back"),
),
ears: (
@ -107,7 +107,7 @@
central: ("npc.saber.female.torso_front"),
),
torso_back: (
offset: (-5.0, -6.0, -5.0),
offset: (-5.0, -12.0, -5.0),
central: ("npc.saber.female.torso_back"),
),
ears: (
@ -137,7 +137,7 @@
central: ("npc.tuskram.male.torso_front"),
),
torso_back: (
offset: (-4.0, -5.0, -4.5),
offset: (-4.0, -10.0, -4.5),
central: ("npc.tuskram.male.torso_back"),
),
ears: (
@ -167,7 +167,7 @@
central: ("npc.tuskram.female.torso_front"),
),
torso_back: (
offset: (-4.0, -5.0, -4.5),
offset: (-4.0, -10.0, -4.5),
central: ("npc.tuskram.female.torso_back"),
),
ears: (
@ -197,7 +197,7 @@
central: ("npc.lion.male.torso_front"),
),
torso_back: (
offset: (-5.5, -6.0, -5.0),
offset: (-5.5, -12.0, -5.0),
central: ("npc.lion.male.torso_back"),
),
ears: (
@ -227,7 +227,7 @@
central: ("npc.lion.female.torso_front"),
),
torso_back: (
offset: (-5.5, -6.0, -5.0),
offset: (-5.5, -12.0, -5.0),
central: ("npc.lion.female.torso_back"),
),
ears: (
@ -257,7 +257,7 @@
central: ("npc.tarasque.male.torso_front"),
),
torso_back: (
offset: (-6.0, 0.0, -6.0),
offset: (-6.0, -13.0, -6.0),
central: ("npc.tarasque.male.torso_back"),
),
ears: (
@ -287,7 +287,7 @@
central: ("npc.tarasque.female.torso_front"),
),
torso_back: (
offset: (-6.0, 0.0, -6.0),
offset: (-6.0, -13.0, -6.0),
central: ("npc.tarasque.female.torso_back"),
),
ears: (
@ -317,7 +317,7 @@
central: ("npc.tiger.male.torso_front"),
),
torso_back: (
offset: (-5.5, -6.5, -5.0),///needs adjust
offset: (-5.5, -13.0, -5.0),
central: ("npc.tiger.male.torso_back"),
),
ears: (
@ -347,7 +347,7 @@
central: ("npc.tiger.female.torso_front"),
),
torso_back: (
offset: (-5.5, -6.5, -5.0),///needs adjust
offset: (-5.5, -13.0, -5.0),
central: ("npc.tiger.female.torso_back"),
),
ears: (
@ -377,7 +377,7 @@
central: ("npc.wolf.male.torso_front"),
),
torso_back: (
offset: (-4.0, -5.5, -5.0),
offset: (-4.0, -11.0, -5.0),
central: ("npc.wolf.male.torso_back"),
),
ears: (
@ -407,7 +407,7 @@
central: ("npc.wolf.female.torso_front"),
),
torso_back: (
offset: (-4.0, -5.5, -5.0),
offset: (-4.0, -11.0, -5.0),
central: ("npc.wolf.female.torso_back"),
),
ears: (
@ -497,7 +497,7 @@
central: ("npc.mouflon.male.torso_front"),
),
torso_back: (
offset: (-4.0, -5.5, -5.0),
offset: (-4.0, -11.0, -5.0),
central: ("npc.mouflon.male.torso_back"),
),
ears: (
@ -505,7 +505,7 @@
central: ("armor.empty"),
),
tail: (
offset: (-2.0, -1.5, 0.0),
offset: (-2.0, -1.5, -7.0),
central: ("npc.mouflon.male.tail"),
),
),
@ -527,7 +527,7 @@
central: ("npc.mouflon.female.torso_front"),
),
torso_back: (
offset: (-4.0, -5.5, -5.0),
offset: (-4.0, -11.0, -5.0),
central: ("npc.mouflon.female.torso_back"),
),
ears: (
@ -535,7 +535,7 @@
central: ("armor.empty"),
),
tail: (
offset: (-2.0, -1.5, 0.0),
offset: (-2.0, -1.5, -7.0),
central: ("npc.mouflon.female.tail"),
),
),

View File

@ -17,11 +17,11 @@
lateral: ("npc.grolgar.male.leg_br"),
),
foot_fl: (
offset: (-2.5, -3.0, -6.0),//y pivot should be -3/4 of the y dimension of the model
offset: (-2.5, -9.0, -6.0),//y pivot should be -3/4 of the y dimension of the model
lateral: ("npc.grolgar.male.foot_fl"),
),
foot_fr: (
offset: (-2.5, -3.0, -6.0),//y pivot should be -3/4 of the y dimension of the model
offset: (-2.5, -9.0, -6.0),//y pivot should be -3/4 of the y dimension of the model
lateral: ("npc.grolgar.male.foot_fr"),
),
foot_bl: (
@ -51,7 +51,7 @@
lateral: ("npc.grolgar.female.leg_br"),
),
foot_fl: (
offset: (-2.5, -3.0, -6.0),
offset: (-2.5, -9.0, -6.0),
lateral: ("npc.grolgar.female.foot_fl"),
),
foot_fr: (
@ -289,19 +289,19 @@
lateral: ("npc.tarasque.male.leg_br"),
),
foot_fl: (
offset: (-4.0, -3.0, -9.0),
offset: (-4.0, -9.0, -9.0),
lateral: ("npc.tarasque.male.foot_fl"),
),
foot_fr: (
offset: (-4.0, -3.0, -9.0),
offset: (-4.0, -9.0, -9.0),
lateral: ("npc.tarasque.male.foot_fr"),
),
foot_bl: (
offset: (-2.5, -2.0, -8.0),
offset: (-2.5, -6.0, -8.0),
lateral: ("npc.tarasque.male.foot_bl"),
),
foot_br: (
offset: (-2.5, -2.0, -8.0),
offset: (-2.5, -6.0, -8.0),
lateral: ("npc.tarasque.male.foot_br"),
),
),
@ -323,19 +323,19 @@
lateral: ("npc.tarasque.female.leg_br"),
),
foot_fl: (
offset: (-4.0, -3.0, -9.0), //(1/4) Y dimension, (1/1) Z dimension
offset: (-4.0, -9.0, -9.0), //(1/4) Y dimension, (1/1) Z dimension
lateral: ("npc.tarasque.female.foot_fl"),
),
foot_fr: (
offset: (-4.0, -3.0, -9.0), //(1/4) Y dimension, (1/1) Z dimension
offset: (-4.0, -9.0, -9.0), //(1/4) Y dimension, (1/1) Z dimension
lateral: ("npc.tarasque.female.foot_fr"),
),
foot_bl: (
offset: (-2.5, -2.0, -8.0),
offset: (-2.5, -6.0, -8.0),
lateral: ("npc.tarasque.female.foot_bl"),
),
foot_br: (
offset: (-2.5, -2.0, -8.0),
offset: (-2.5, -6.0, -8.0),
lateral: ("npc.tarasque.female.foot_br"),
),
),
@ -357,19 +357,19 @@
lateral: ("npc.tiger.male.leg_br"),
),
foot_fl: (
offset: (-2.5, -2.0, -6.0),
offset: (-2.5, -6.0, -6.0),
lateral: ("npc.tiger.male.foot_fl"),
),
foot_fr: (
offset: (-2.5, -2.0, -6.0),
offset: (-2.5, -6.0, -6.0),
lateral: ("npc.tiger.male.foot_fr"),
),
foot_bl: (
offset: (-2.5, -2.0, -6.0),
offset: (-2.5, -5.0, -6.0),
lateral: ("npc.tiger.male.foot_bl"),
),
foot_br: (
offset: (-2.5, -2.0, -6.0),
offset: (-2.5, -5.0, -6.0),
lateral: ("npc.tiger.male.foot_br"),
),
),
@ -391,19 +391,19 @@
lateral: ("npc.tiger.female.leg_br"),
),
foot_fl: (
offset: (-2.5, -2.0, -6.0),
offset: (-2.5, -6.0, -6.0),
lateral: ("npc.tiger.female.foot_fl"),
),
foot_fr: (
offset: (-2.5, -2.0, -6.0),
offset: (-2.5, -6.0, -6.0),
lateral: ("npc.tiger.female.foot_fr"),
),
foot_bl: (
offset: (-2.5, -2.0, -6.0),
offset: (-2.5, -5.0, -6.0),
lateral: ("npc.tiger.female.foot_bl"),
),
foot_br: (
offset: (-2.5, -2.0, -6.0),
offset: (-2.5, -5.0, -6.0),
lateral: ("npc.tiger.female.foot_br"),
),
),
@ -425,19 +425,19 @@
lateral: ("npc.wolf.male.leg_br"),
),
foot_fl: (
offset: (-1.5, -3.0, -9.0),
offset: (-1.5, -4.0, -9.0),
lateral: ("npc.wolf.male.foot_fl"),
),
foot_fr: (
offset: (-1.5, -3.0, -9.0),
offset: (-1.5, -4.0, -9.0),
lateral: ("npc.wolf.male.foot_fr"),
),
foot_bl: (
offset: (-1.5, -3.0, -9.0),
offset: (-1.5, -4.0, -9.0),
lateral: ("npc.wolf.male.foot_bl"),
),
foot_br: (
offset: (-1.5, -3.0, -9.0),
offset: (-1.5, -4.0, -9.0),
lateral: ("npc.wolf.male.foot_br"),
),
),
@ -459,19 +459,19 @@
lateral: ("npc.wolf.female.leg_br"),
),
foot_fl: (
offset: (-1.5, -3.0, -9.0),
offset: (-1.5, -4.0, -9.0),
lateral: ("npc.wolf.female.foot_fl"),
),
foot_fr: (
offset: (-1.5, -3.0, -9.0),
offset: (-1.5, -4.0, -9.0),
lateral: ("npc.wolf.female.foot_fr"),
),
foot_bl: (
offset: (-1.5, -3.0, -9.0),
offset: (-1.5, -4.0, -9.0),
lateral: ("npc.wolf.female.foot_bl"),
),
foot_br: (
offset: (-1.5, -3.0, -9.0),
offset: (-1.5, -4.0, -9.0),
lateral: ("npc.wolf.female.foot_br"),
),
),
@ -493,19 +493,19 @@
lateral: ("npc.frostfang.male.leg_br"),
),
foot_fl: (
offset: (-2.5, -3.0, -6.0),
offset: (-2.5, -4.0, -6.0),
lateral: ("npc.frostfang.male.foot_fl"),
),
foot_fr: (
offset: (-2.5, -3.0, -6.0),
offset: (-2.5, -4.0, -6.0),
lateral: ("npc.frostfang.male.foot_fr"),
),
foot_bl: (
offset: (-2.5, -3.0, -6.0),
offset: (-2.5, -4.0, -6.0),
lateral: ("npc.frostfang.male.foot_bl"),
),
foot_br: (
offset: (-2.5, -3.0, -6.0),
offset: (-2.5, -4.0, -6.0),
lateral: ("npc.frostfang.male.foot_br"),
),
),
@ -527,19 +527,19 @@
lateral: ("npc.frostfang.female.leg_br"),
),
foot_fl: (
offset: (-2.5, -3.0, -6.0),
offset: (-2.5, -4.0, -6.0),
lateral: ("npc.frostfang.female.foot_fl"),
),
foot_fr: (
offset: (-2.5, -3.0, -6.0),
offset: (-2.5, -4.0, -6.0),
lateral: ("npc.frostfang.female.foot_fr"),
),
foot_bl: (
offset: (-2.5, -3.0, -6.0),
offset: (-2.5, -4.0, -6.0),
lateral: ("npc.frostfang.female.foot_bl"),
),
foot_br: (
offset: (-2.5, -3.0, -6.0),
offset: (-2.5, -4.0, -6.0),
lateral: ("npc.frostfang.female.foot_br"),
),
),
@ -561,19 +561,19 @@
lateral: ("npc.mouflon.male.leg_br"),
),
foot_fl: (
offset: (-1.0, -2.0, -7.0),
offset: (-1.0, -3.0, -7.0),
lateral: ("npc.mouflon.male.foot_fl"),
),
foot_fr: (
offset: (-1.0, -2.0, -7.0),
offset: (-1.0, -3.0, -7.0),
lateral: ("npc.mouflon.male.foot_fr"),
),
foot_bl: (
offset: (-1.0, -1.0, -6.0),
offset: (-1.0, -2.0, -6.0),
lateral: ("npc.mouflon.male.foot_bl"),
),
foot_br: (
offset: (-1.0, -1.0, -6.0),
offset: (-1.0, -2.0, -6.0),
lateral: ("npc.mouflon.male.foot_br"),
),
),
@ -595,19 +595,19 @@
lateral: ("npc.mouflon.female.leg_br"),
),
foot_fl: (
offset: (-1.0, -2.0, -7.0),
offset: (-1.0, -3.0, -7.0),
lateral: ("npc.mouflon.female.foot_fl"),
),
foot_fr: (
offset: (-1.0, -2.0, -7.0),
offset: (-1.0, -3.0, -7.0),
lateral: ("npc.mouflon.female.foot_fr"),
),
foot_bl: (
offset: (-1.0, -1.0, -6.0),
offset: (-1.0, -2.0, -6.0),
lateral: ("npc.mouflon.female.foot_bl"),
),
foot_br: (
offset: (-1.0, -1.0, -6.0),
offset: (-1.0, -2.0, -6.0),
lateral: ("npc.mouflon.female.foot_br"),
),
),

View File

@ -59,7 +59,7 @@ impl Animation for IdleAnimation {
next.feet_b.scale = Vec3::one() / 18.0;
next.tail.offset =
Vec3::new(0.0, skeleton_attr.tail.0 + wave * 1.0, skeleton_attr.tail.1) / 18.0;
Vec3::new(0.0, skeleton_attr.tail.0 + wave * 0.2, skeleton_attr.tail.1) / 18.0;
next.tail.ori = Quaternion::rotation_y(wave_slow * 0.05);
next.tail.scale = Vec3::one() / 18.0;

View File

@ -21,9 +21,9 @@ impl Animation for IdleAnimation {
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let wave_ultra_slow = (anim_time as f32 * 1.0 + PI).sin();
let slower = (anim_time as f32 * 1.0 + PI).sin();
let wave_ultra_slow_cos = (anim_time as f32 * 1.0 + PI).cos();
let wave_slow = (anim_time as f32 * 3.5 + PI).sin();
let slow = (anim_time as f32 * 3.5 + PI).sin();
let wave_slow_cos = (anim_time as f32 * 3.5 + PI).cos();
let look = Vec2::new(
@ -54,7 +54,7 @@ impl Animation for IdleAnimation {
next.head_upper.offset = Vec3::new(
0.0,
skeleton_attr.head_upper.0,
skeleton_attr.head_upper.1 + wave_ultra_slow * 0.4,
skeleton_attr.head_upper.1 + slower * 0.2,
);
next.head_upper.ori =
Quaternion::rotation_z(0.3 * look.x) * Quaternion::rotation_x(0.3 * look.y);
@ -63,7 +63,7 @@ impl Animation for IdleAnimation {
next.head_lower.offset = Vec3::new(
0.0,
skeleton_attr.head_lower.0,
skeleton_attr.head_lower.1 + wave_ultra_slow * 0.20,
skeleton_attr.head_lower.1 + slower * 0.1,
);
next.head_lower.ori =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
@ -72,17 +72,17 @@ impl Animation for IdleAnimation {
next.jaw.offset = Vec3::new(
0.0,
skeleton_attr.jaw.0 - wave_ultra_slow_cos * 0.12,
skeleton_attr.jaw.1 + wave_slow * 0.2,
skeleton_attr.jaw.1 + slow * 0.2,
);
next.jaw.ori = Quaternion::rotation_x(wave_slow * 0.05);
next.jaw.ori = Quaternion::rotation_x(slow * 0.05);
next.jaw.scale = Vec3::one() * 1.02;
next.tail.offset = Vec3::new(
0.0,
skeleton_attr.tail.0,
skeleton_attr.tail.1 + wave_ultra_slow * 0.6,
skeleton_attr.tail.1 + slower * 0.6,
);
next.tail.ori = Quaternion::rotation_z(0.0 + wave_slow * 0.2 + tailmove.x)
next.tail.ori = Quaternion::rotation_z(0.0 + slow * 0.2 + tailmove.x)
* Quaternion::rotation_x(0.0);
next.tail.scale = Vec3::one();
@ -91,15 +91,15 @@ impl Animation for IdleAnimation {
next.torso_front.offset = Vec3::new(
0.0,
skeleton_attr.torso_front.0,
skeleton_attr.torso_front.1 + wave_ultra_slow * 0.5,
skeleton_attr.torso_front.1 + slower * 0.5,
)/8.0;
next.torso_front.ori = Quaternion::rotation_y(wave_slow * 0.015);
next.torso_front.ori = Quaternion::rotation_y(slow * 0.015);
next.torso_front.scale = Vec3::one() / 8.0;
next.torso_back.offset = Vec3::new(
0.0,
skeleton_attr.torso_back.0,
skeleton_attr.torso_back.1 + wave_ultra_slow * 0.2,
skeleton_attr.torso_back.1 + slower * 0.2,
);
next.torso_back.ori = Quaternion::rotation_y(wave_slow_cos * 0.015)
* Quaternion::rotation_z(0.0)
@ -107,45 +107,45 @@ impl Animation for IdleAnimation {
next.torso_back.scale = Vec3::one();
next.ears.offset = Vec3::new(0.0, skeleton_attr.ears.0, skeleton_attr.ears.1);
next.ears.ori = Quaternion::rotation_x(0.0 + wave_ultra_slow * 0.03);
next.ears.ori = Quaternion::rotation_x(0.0 + slower * 0.03);
next.ears.scale = Vec3::one() * 1.02;
next.leg_fl.offset = Vec3::new(
-skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1,
skeleton_attr.leg_f.2,
skeleton_attr.leg_f.2 + slower * -0.2,
);
next.leg_fl.ori = Quaternion::rotation_x(0.0);
next.leg_fl.ori = Quaternion::rotation_y(slow * -0.015);
next.leg_fl.scale = Vec3::one();
next.leg_fr.offset = Vec3::new(
skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1,
skeleton_attr.leg_f.2,
skeleton_attr.leg_f.2 + slower * -0.2,
);
next.leg_fr.ori = Quaternion::rotation_x(0.0);
next.leg_fr.ori = Quaternion::rotation_y(slow * -0.015);
next.leg_fr.scale = Vec3::one();
next.leg_bl.offset = Vec3::new(
-skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1,
skeleton_attr.leg_b.2,
skeleton_attr.leg_b.2 + slower * -0.2,
);
next.leg_bl.ori = Quaternion::rotation_x(0.0);
next.leg_bl.ori = Quaternion::rotation_y(slow * -0.015+wave_slow_cos * -0.015);
next.leg_bl.scale = Vec3::one();
next.leg_br.offset = Vec3::new(
skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1,
skeleton_attr.leg_b.2,
skeleton_attr.leg_b.2 + slower * -0.2,
);
next.leg_br.ori = Quaternion::rotation_x(0.0);
next.leg_br.ori = Quaternion::rotation_y(slow * -0.015+wave_slow_cos * -0.015);
next.leg_br.scale = Vec3::one();
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2,
skeleton_attr.feet_f.2+ slower * -0.2,
);
next.foot_fl.ori = Quaternion::rotation_x(0.0);
next.foot_fl.scale = Vec3::one();
@ -153,7 +153,7 @@ impl Animation for IdleAnimation {
next.foot_fr.offset = Vec3::new(
skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2,
skeleton_attr.feet_f.2+ slower * -0.2,
);
next.foot_fr.ori = Quaternion::rotation_x(0.0);
next.foot_fr.scale = Vec3::one();
@ -161,7 +161,7 @@ impl Animation for IdleAnimation {
next.foot_bl.offset = Vec3::new(
-skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2,
skeleton_attr.feet_b.2+ slower * -0.2,
);
next.foot_bl.ori = Quaternion::rotation_x(0.0);
next.foot_bl.scale = Vec3::one();
@ -169,7 +169,7 @@ impl Animation for IdleAnimation {
next.foot_br.offset = Vec3::new(
skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2,
skeleton_attr.feet_b.2+ slower * -0.2,
);
next.foot_br.ori = Quaternion::rotation_x(0.0);
next.foot_br.scale = Vec3::one();

View File

@ -175,15 +175,15 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
(Mouflon, _) => (10.5, -4.0),
},
tail: match (body.species, body.body_type) {
(Grolgar, _) => (-5.5, -0.5),
(Saber, _) => (-6.0, 1.0),
(Tuskram, _) => (-4.0, 2.0),
(Lion, _) => (-6.0, 1.0),
(Tarasque, _) => (2.0, 0.0),
(Tiger, _) => (-6.5, -7.0),
(Wolf, _) => (-5.0, 0.0),
(Frostfang, _) => (-4.0, -3.5),
(Mouflon, _) => (-5.0, -3.5),
(Grolgar, _) => (-11.5, -0.5),
(Saber, _) => (-11.0, 1.0),
(Tuskram, _) => (-10.0, 2.0),
(Lion, _) => (-11.0, 1.0),
(Tarasque, _) => (-11.0, 0.0),
(Tiger, _) => (-12.5, -7.0),
(Wolf, _) => (-11.0, 0.0),
(Frostfang, _) => (-10.0, -3.5),
(Mouflon, _) => (-12.0, 1.5),
},
torso_front: match (body.species, body.body_type) {
(Grolgar, _) => (10.0, 11.0),
@ -197,15 +197,15 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
(Mouflon, _) => (11.0, 13.5),
},
torso_back: match (body.species, body.body_type) {
(Grolgar, _) => (-20.0, 1.5),
(Saber, _) => (-19.5, 0.0),
(Tuskram, _) => (-18.0, -2.0),
(Lion, _) => (-19.0, -1.0),
(Tarasque, _) => (-26.0, -1.0),
(Tiger, _) => (-19.0, 0.0),
(Wolf, _) => (-18.5, 1.0),
(Frostfang, _) => (-15.0, 0.0),
(Mouflon, _) => (-14.5, -0.5),
(Grolgar, _) => (-14.0, 1.5),
(Saber, _) => (-13.5, 0.0),
(Tuskram, _) => (-12.0, -2.0),
(Lion, _) => (-13.0, -1.0),
(Tarasque, _) => (-14.0, -1.0),
(Tiger, _) => (-13.0, 0.0),
(Wolf, _) => (-12.5, 1.0),
(Frostfang, _) => (-9.0, 0.0),
(Mouflon, _) => (-8.5, -0.5),
},
ears: match (body.species, body.body_type) {
(Grolgar, _) => (5.0, 9.5),
@ -225,20 +225,20 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
(Lion, _) => (7.5, -4.5, -6.0),
(Tarasque, _) => (7.0, -8.0, -6.0),
(Tiger, _) => (7.0, -2.0, -1.0),
(Wolf, _) => (4.0, -6.5, -1.0),
(Wolf, _) => (4.5, -6.5, -1.0),
(Frostfang, _) => (5.5, -5.5, -2.0),
(Mouflon, _) => (3.5, -5.5, -5.0),
(Mouflon, _) => (5.0, -5.5, -5.0),
},
leg_b: match (body.species, body.body_type) {
(Grolgar, _) => (6.0, -0.5, -3.5),
(Saber, _) => (6.0, -1.0, -4.0),
(Tuskram, _) => (5.0, 0.5, -3.5),
(Lion, _) => (6.0, 0.0, -2.0),
(Tarasque, _) => (6.0, 7.5, -6.5),
(Tiger, _) => (7.0, -2.0, -1.0),
(Wolf, _) => (4.5, 0.0, -2.5),
(Frostfang, _) => (3.5, -0.5, -2.0),
(Mouflon, _) => (3.5, -2.0, -4.5),
(Grolgar, _) => (6.0, -6.5, -3.5),
(Saber, _) => (6.0, -7.0, -4.0),
(Tuskram, _) => (5.0, -5.5, -3.5),
(Lion, _) => (6.0, -6.0, -2.0),
(Tarasque, _) => (6.0, -6.5, -6.5),
(Tiger, _) => (7.0, -8.0, -1.0),
(Wolf, _) => (5.0, -6.5, -2.5),
(Frostfang, _) => (3.5, -6.5, -2.0),
(Mouflon, _) => (3.5, -5.0, -4.5),
},
feet_f: match (body.species, body.body_type) {
(Grolgar, _) => (0.0, -2.0, -4.0),
@ -260,7 +260,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
(Tiger, _) => (1.0, 0.5, -4.0),
(Wolf, _) => (0.0, -0.5, -2.5),
(Frostfang, _) => (0.0, -0.5, -3.5),
(Mouflon, _) => (-1.0, -2.5, -2.5),
(Mouflon, _) => (-1.0, -0.5, -2.5),
},
}
}

View File

@ -120,7 +120,7 @@ impl Animation for RunAnimation {
let vertchest = (anim_time as f32 * lab as f32 + PI * 0.3).sin().max(0.2);
let horichest = (anim_time as f32 * lab as f32 + PI * 0.8).sin();
if speed < 8.0{
if speed < 8.0{//Trot
next.head_upper.offset = Vec3::new(
0.0,
skeleton_attr.head_upper.0,
@ -173,7 +173,7 @@ if speed < 8.0{
skeleton_attr.leg_f.1 + foothoril * -1.0,
skeleton_attr.leg_f.2 +1.0+ footvertl * -0.06,
);
next.leg_fl.ori = Quaternion::rotation_x(footrotl * -0.15);
next.leg_fl.ori = Quaternion::rotation_x(footrotl * -0.09);
next.leg_fl.scale = Vec3::one()*0.99;
@ -182,7 +182,7 @@ if speed < 8.0{
skeleton_attr.leg_f.1 + foothorir * -1.0,
skeleton_attr.leg_f.2 +1.0+ footvertr * -0.6,
);
next.leg_fr.ori = Quaternion::rotation_x(footrotr * -0.15);
next.leg_fr.ori = Quaternion::rotation_x(footrotr * -0.09);
next.leg_fr.scale = Vec3::one()*0.99;
next.leg_bl.offset = Vec3::new(
@ -191,7 +191,7 @@ if speed < 8.0{
skeleton_attr.leg_b.2 +1.0+ footvertlb * -0.8,
);
next.leg_bl.ori = Quaternion::rotation_x(footrotlb * -0.15);
next.leg_bl.ori = Quaternion::rotation_x(footrotlb * -0.09);
next.leg_bl.scale = Vec3::one() *0.99;
next.leg_br.offset = Vec3::new(
@ -199,7 +199,7 @@ if speed < 8.0{
skeleton_attr.leg_b.1 + foothorirb * -1.0,
skeleton_attr.leg_b.2 +1.0+ footvertrb * -0.8,
);
next.leg_br.ori = Quaternion::rotation_x(footrotrb * -0.15);
next.leg_br.ori = Quaternion::rotation_x(footrotrb * -0.09);
next.leg_br.scale = Vec3::one() *0.99;
next.foot_fl.offset = Vec3::new(
@ -207,7 +207,7 @@ if speed < 8.0{
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2+ ((footvertl * -1.5).max(-1.0)),
);
next.foot_fl.ori = Quaternion::rotation_x(footrotl * -0.3);
next.foot_fl.ori = Quaternion::rotation_x(footrotl * -0.6);
next.foot_fl.scale = Vec3::one()*0.97;
next.foot_fr.offset = Vec3::new(
@ -215,7 +215,7 @@ if speed < 8.0{
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2+ ((footvertr * -1.5).max(-1.0)),
);
next.foot_fr.ori = Quaternion::rotation_x(footrotr * -0.3);
next.foot_fr.ori = Quaternion::rotation_x(footrotr * -0.6);
next.foot_fr.scale = Vec3::one()*0.98;
next.foot_bl.offset = Vec3::new(
@ -223,7 +223,7 @@ if speed < 8.0{
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2+ ((footvertlb * -1.5).max(-1.0)),
);
next.foot_bl.ori = Quaternion::rotation_x(footrotlb * -0.3);
next.foot_bl.ori = Quaternion::rotation_x(footrotlb * -0.6);
next.foot_bl.scale = Vec3::one()*0.98;
next.foot_br.offset = Vec3::new(
@ -231,10 +231,10 @@ if speed < 8.0{
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2 + ((footvertrb * -1.5).max(-1.0)),
);
next.foot_br.ori = Quaternion::rotation_x(footrotrb * -0.3);
next.foot_br.ori = Quaternion::rotation_x(footrotrb * -0.6);
next.foot_br.scale = Vec3::one()*0.98;
}
else {
else {//Gallop
next.head_upper.offset = Vec3::new(
0.0,
skeleton_attr.head_upper.0,