manifests, skeleton, basic placement

This commit is contained in:
jshipsey 2020-06-04 22:04:07 -04:00
parent c527484597
commit ccf939b4fd
18 changed files with 165 additions and 166 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,209 +1,210 @@
({ ({
(Crocodile, Male): ( (Crocodile, Male): (
upper: ( upper: (
offset: (-7.0, -9.0, -5.5), offset: (-4.0, -8.5, -3.0),
central: ("npc.crocodile.male.head_upper"), central: ("npc.crocodile.male.head_upper"),
), ),
lower: ( lower: (
offset: (-7.0, -4.5, -5.0), offset: (-4.0, -4.0, -3.0),
central: ("npc.crocodile.male.head_lower"), central: ("npc.crocodile.male.head_lower"),
), ),
jaw: ( jaw: (
offset: (-3.0, -3.0, -2.5), offset: (-4.0, -7.0, -1.5),
central: ("npc.crocodile.male.jaw"), central: ("npc.crocodile.male.jaw"),
), ),
chest: ( chest: (
offset: (-8.0, -5.5, -6.0), offset: (-5.0, -7.5, -3.0),
central: ("npc.crocodile.male.chest"), central: ("npc.crocodile.male.chest"),
), ),
tail_rear: ( tail_rear: (
offset: (-2.0, -9.5, -5.0), offset: (-1.0, -4.5, -1.5),
central: ("npc.crocodile.male.tail_rear"), central: ("npc.crocodile.male.tail_rear"),
), ),
tail_front: ( tail_front: (
offset: (-2.0, -9.5, -5.0), offset: (-3.0, -13.0, -2.5),
central: ("npc.crocodile.male.tail_front"), central: ("npc.crocodile.male.tail_front"),
), ),
), ),
(Crocodile, Female): ( (Crocodile, Female): (
upper: ( upper: (
offset: (-7.0, -9.0, -5.5), offset: (-4.0, -8.5, -3.0),
central: ("npc.crocodile.female.head_upper"), central: ("npc.crocodile.female.head_upper"),
), ),
lower: ( lower: (
offset: (-7.0, -4.5, -5.0), offset: (-4.0, -4.0, -3.0),
central: ("npc.crocodile.female.head_lower"), central: ("npc.crocodile.female.head_lower"),
), ),
jaw: ( jaw: (
offset: (-3.0, -3.0, -2.5), offset: (-4.0, -7.0, -1.5),
central: ("npc.crocodile.female.jaw"), central: ("npc.crocodile.female.jaw"),
), ),
chest: ( chest: (
offset: (-8.0, -5.5, -6.0), offset: (-5.0, -7.5, -3.0),
central: ("npc.crocodile.female.chest"), central: ("npc.crocodile.female.chest"),
), ),
tail_rear: ( tail_rear: (
offset: (-2.0, -9.5, -5.0), offset: (-1.0, -4.5, -1.5),
central: ("npc.crocodile.female.tail_rear"), central: ("npc.crocodile.female.tail_rear"),
), ),
tail_front: ( tail_front: (
offset: (-2.0, -9.5, -5.0), offset: (-3.0, -13.0, -2.5),
central: ("npc.crocodile.female.tail_front"), central: ("npc.crocodile.female.tail_front"),
), ),
), ),
(Alligator, Male): ( (Alligator, Male): (
upper: ( upper: (
offset: (-7.0, -9.0, -5.5), offset: (-4.0, -8.5, -2.5),
central: ("npc.alligator.male.head_upper"), central: ("npc.alligator.male.head_upper"),
), ),
lower: ( lower: (
offset: (-7.0, -4.5, -5.0), offset: (-4.0, -4.0, -3.5),
central: ("npc.alligator.male.head_lower"), central: ("npc.alligator.male.head_lower"),
), ),
jaw: ( jaw: (
offset: (-3.0, -3.0, -2.5), offset: (-4.0, -7.5, -2.5),
central: ("npc.alligator.male.jaw"), central: ("npc.alligator.male.jaw"),
), ),
chest: ( chest: (
offset: (-8.0, -5.5, -6.0), offset: (-6.0, -7.5, -3.5),
central: ("npc.alligator.male.chest"), central: ("npc.alligator.male.chest"),
), ),
tail_rear: ( tail_rear: (
offset: (-2.0, -9.5, -5.0), offset: (-2.0, -9.0, -1.5),
central: ("npc.alligator.male.tail_rear"), central: ("npc.alligator.male.tail_rear"),
), ),
tail_front: ( tail_front: (
offset: (-2.0, -9.5, -5.0), offset: (-4.0, -13.0, -2.5),
central: ("npc.alligator.male.tail_front"), central: ("npc.alligator.male.tail_front"),
), ),
), ),
(Alligator, Female): ( (Alligator, Female): (
upper: ( upper: (
offset: (-7.0, -9.0, -5.5), offset: (-4.0, -8.5, -2.5),
central: ("npc.alligator.female.head_upper"), central: ("npc.alligator.female.head_upper"),
), ),
lower: ( lower: (
offset: (-7.0, -4.5, -5.0), offset: (-4.0, -4.0, -3.5),
central: ("npc.alligator.female.head_lower"), central: ("npc.alligator.female.head_lower"),
), ),
jaw: ( jaw: (
offset: (-3.0, -3.0, -2.5), offset: (-4.0, -7.5, -2.5),
central: ("npc.alligator.female.jaw"), central: ("npc.alligator.female.jaw"),
), ),
chest: ( chest: (
offset: (-8.0, -5.5, -6.0), offset: (-6.0, -7.5, -3.5),
central: ("npc.alligator.female.chest"), central: ("npc.alligator.female.chest"),
), ),
tail_rear: ( tail_rear: (
offset: (-2.0, -9.5, -5.0), offset: (-2.0, -9.0, -1.5),
central: ("npc.alligator.female.tail_rear"), central: ("npc.alligator.female.tail_rear"),
), ),
tail_front: ( tail_front: (
offset: (-2.0, -9.5, -5.0), offset: (-4.0, -13.0, -2.5),
central: ("npc.alligator.female.tail_front"), central: ("npc.alligator.female.tail_front"),
), ),
), ),
(Salamander, Male): ( (Salamander, Male): (
upper: ( upper: (
offset: (-7.0, -9.0, -5.5), offset: (-6.5, -6.0, -2.0),
central: ("npc.salamander.male.head_upper"), central: ("npc.salamander.male.head_upper"),
), ),
lower: ( lower: (
offset: (-7.0, -4.5, -5.0), offset: (-6.5, -3.5, -2.0),
central: ("npc.salamander.male.head_lower"), central: ("npc.salamander.male.head_lower"),
), ),
jaw: ( jaw: (
offset: (-3.0, -3.0, -2.5), offset: (-5.5, -4.0, -2.0),
central: ("npc.salamander.male.jaw"), central: ("npc.salamander.male.jaw"),
), ),
chest: ( chest: (
offset: (-8.0, -5.5, -6.0), offset: (-6.5, -8.5, -3.0),
central: ("npc.salamander.male.chest"), central: ("npc.salamander.male.chest"),
), ),
tail_rear: ( tail_rear: (
offset: (-2.0, -9.5, -5.0), offset: (-3.0, -13.0, -3.0),
central: ("npc.salamander.male.tail_rear"), central: ("npc.salamander.male.tail_rear"),
), ),
tail_front: ( tail_front: (
offset: (-2.0, -9.5, -5.0), offset: (-4.5, -9.0, -3.0),
central: ("npc.salamander.male.tail_front"), central: ("npc.salamander.male.tail_front"),
), ),
), ),
(Salamander, Female): ( (Salamander, Female): (
upper: ( upper: (
offset: (-7.0, -9.0, -5.5), offset: (-6.5, -6.0, -2.0),
central: ("npc.salamander.female.head_upper"), central: ("npc.salamander.female.head_upper"),
), ),
lower: ( lower: (
offset: (-7.0, -4.5, -5.0), offset: (-6.5, -3.5, -2.0),
central: ("npc.salamander.female.head_lower"), central: ("npc.salamander.female.head_lower"),
), ),
jaw: ( jaw: (
offset: (-3.0, -3.0, -2.5), offset: (-5.5, -4.0, -2.0),
central: ("npc.salamander.female.jaw"), central: ("npc.salamander.female.jaw"),
), ),
chest: ( chest: (
offset: (-8.0, -5.5, -6.0), offset: (-6.5, -8.5, -3.0),
central: ("npc.salamander.female.chest"), central: ("npc.salamander.female.chest"),
), ),
tail_rear: ( tail_rear: (
offset: (-2.0, -9.5, -5.0), offset: (-3.0, -13.0, -3.0),
central: ("npc.salamander.female.tail_rear"), central: ("npc.salamander.female.tail_rear"),
), ),
tail_front: ( tail_front: (
offset: (-2.0, -9.5, -5.0), offset: (-4.5, -9.0, -3.0),
central: ("npc.salamander.female.tail_front"), central: ("npc.salamander.female.tail_front"),
), ),
), ),
(Monitor, Male): ( (Monitor, Male): (
upper: ( upper: (
offset: (-7.0, -9.0, -5.5), offset: (-3.0, -5.5, -3.0),
central: ("npc.monitor.male.head_upper"), central: ("npc.monitor.male.head_upper"),
), ),
lower: ( lower: (
offset: (-7.0, -4.5, -5.0), offset: (-3.0, -3.5, -3.5),
central: ("npc.monitor.male.head_lower"), central: ("npc.monitor.male.head_lower"),
), ),
jaw: ( jaw: (
offset: (-3.0, -3.0, -2.5), offset: (-3.0, -3.5, -1.0),
central: ("npc.monitor.male.jaw"), central: ("npc.monitor.male.jaw"),
), ),
chest: ( chest: (
offset: (-8.0, -5.5, -6.0), offset: (-4.0, -7.0, -3.0),
central: ("npc.monitor.male.chest"), central: ("npc.monitor.male.chest"),
), ),
tail_rear: ( tail_rear: (
offset: (-2.0, -9.5, -5.0), offset: (-1.0, -11.0, -2.0),
central: ("npc.monitor.male.tail_rear"), central: ("npc.monitor.male.tail_rear"),
), ),
tail_front: ( tail_front: (
offset: (-2.0, -9.5, -5.0), offset: (-2.0, -13.0, -2.0),
central: ("npc.monitor.male.tail_front"), central: ("npc.monitor.male.tail_front"),
), ),
), ),
(Monitor, Female): ( (Monitor, Female): (
upper: ( upper: (
offset: (-7.0, -9.0, -5.5), offset: (-3.0, -5.5, -3.0),
central: ("npc.monitor.female.head_upper"), central: ("npc.monitor.female.head_upper"),
), ),
lower: ( lower: (
offset: (-7.0, -4.5, -5.0), offset: (-3.0, -3.5, -3.5),
central: ("npc.monitor.female.head_lower"), central: ("npc.monitor.female.head_lower"),
), ),
jaw: ( jaw: (
offset: (-3.0, -3.0, -2.5), offset: (-3.0, -3.5, -1.0),
central: ("npc.monitor.female.jaw"), central: ("npc.monitor.female.jaw"),
), ),
chest: ( chest: (
offset: (-8.0, -5.5, -6.0), offset: (-4.0, -7.0, -3.0),
central: ("npc.monitor.female.chest"), central: ("npc.monitor.female.chest"),
), ),
tail_rear: ( tail_rear: (
offset: (-2.0, -9.5, -5.0), offset: (-1.0, -11.0, -2.0),
central: ("npc.monitor.female.tail_rear"), central: ("npc.monitor.female.tail_rear"),
), ),
tail_front: ( tail_front: (
offset: (-2.0, -9.5, -5.0), offset: (-2.0, -13.0, -2.0),
central: ("npc.monitor.female.tail_front"), central: ("npc.monitor.female.tail_front"),
), ),
), ),

View File

@ -1,145 +1,145 @@
({ ({
(Crocodile, Male): ( (Crocodile, Male): (
front_left: ( front_left: (
offset: (-2.5, -4.0, -1.5), offset: (-3.5, -3.5, -4.0),
lateral: ("npc.crocodile.male.foot_fl"), lateral: ("npc.crocodile.male.foot_fl"),
), ),
front_right: ( front_right: (
offset: (-2.5, -4.0, -1.5), offset: (-3.5, -3.5, -4.0),
lateral: ("npc.crocodile.male.foot_fr"), lateral: ("npc.crocodile.male.foot_fr"),
), ),
back_left: ( back_left: (
offset: (-2.5, -4.0, -3.0), offset: (-4.0, -2.5, -4.0),
lateral: ("npc.crocodile.male.foot_bl"), lateral: ("npc.crocodile.male.foot_bl"),
), ),
back_right: ( back_right: (
offset: (-2.5, -4.0, -3.0), offset: (-4.0, -2.5, -4.0),
lateral: ("npc.crocodile.male.foot_br"), lateral: ("npc.crocodile.male.foot_br"),
), ),
), ),
(Crocodile, Female): ( (Crocodile, Female): (
front_left: ( front_left: (
offset: (-2.5, -4.0, -1.5), offset: (-3.5, -3.5, -4.0),
lateral: ("npc.crocodile.female.foot_fl"), lateral: ("npc.crocodile.female.foot_fl"),
), ),
front_right: ( front_right: (
offset: (-2.5, -4.0, -1.5), offset: (-3.5, -3.5, -4.0),
lateral: ("npc.crocodile.female.foot_fr"), lateral: ("npc.crocodile.female.foot_fr"),
), ),
back_left: ( back_left: (
offset: (-2.5, -4.0, -3.0), offset: (-4.0, -2.5, -4.0),
lateral: ("npc.crocodile.female.foot_bl"), lateral: ("npc.crocodile.female.foot_bl"),
), ),
back_right: ( back_right: (
offset: (-2.5, -4.0, -3.0), offset: (-4.0, -2.5, -4.0),
lateral: ("npc.crocodile.female.foot_br"), lateral: ("npc.crocodile.female.foot_br"),
), ),
), ),
(Alligator, Male): ( (Alligator, Male): (
front_left: ( front_left: (
offset: (-2.5, -4.0, -1.5), offset: (-3.5, -3.5, -4.0),
lateral: ("npc.alligator.male.foot_fl"), lateral: ("npc.alligator.male.foot_fl"),
), ),
front_right: ( front_right: (
offset: (-2.5, -4.0, -1.5), offset: (-3.5, -3.5, -4.0),
lateral: ("npc.alligator.male.foot_fr"), lateral: ("npc.alligator.male.foot_fr"),
), ),
back_left: ( back_left: (
offset: (-2.5, -4.0, -3.0), offset: (-4.0, -2.5, -4.0),
lateral: ("npc.alligator.male.foot_bl"), lateral: ("npc.alligator.male.foot_bl"),
), ),
back_right: ( back_right: (
offset: (-2.5, -4.0, -3.0), offset: (-4.0, -2.5, -4.0),
lateral: ("npc.alligator.male.foot_br"), lateral: ("npc.alligator.male.foot_br"),
), ),
), ),
(Alligator, Female): ( (Alligator, Female): (
front_left: ( front_left: (
offset: (-2.5, -4.0, -1.5), offset: (-3.5, -3.5, -4.0),
lateral: ("npc.alligator.female.foot_fl"), lateral: ("npc.alligator.female.foot_fl"),
), ),
front_right: ( front_right: (
offset: (-2.5, -4.0, -1.5), offset: (-3.5, -3.5, -4.0),
lateral: ("npc.alligator.female.foot_fr"), lateral: ("npc.alligator.female.foot_fr"),
), ),
back_left: ( back_left: (
offset: (-2.5, -4.0, -3.0), offset: (-4.0, -2.5, -4.0),
lateral: ("npc.alligator.female.foot_bl"), lateral: ("npc.alligator.female.foot_bl"),
), ),
back_right: ( back_right: (
offset: (-2.5, -4.0, -3.0), offset: (-4.0, -2.5, -4.0),
lateral: ("npc.alligator.female.foot_br"), lateral: ("npc.alligator.female.foot_br"),
), ),
), ),
(Salamander, Male): ( (Salamander, Male): (
front_left: ( front_left: (
offset: (-2.5, -4.0, -1.5), offset: (-3.0, -3.5, -3.0),
lateral: ("npc.salamander.male.foot_fl"), lateral: ("npc.salamander.male.foot_fl"),
), ),
front_right: ( front_right: (
offset: (-2.5, -4.0, -1.5), offset: (-3.0, -3.5, -3.0),
lateral: ("npc.salamander.male.foot_fr"), lateral: ("npc.salamander.male.foot_fr"),
), ),
back_left: ( back_left: (
offset: (-2.5, -4.0, -3.0), offset: (-3.5, -2.5, -3.0),
lateral: ("npc.salamander.male.foot_bl"), lateral: ("npc.salamander.male.foot_bl"),
), ),
back_right: ( back_right: (
offset: (-2.5, -4.0, -3.0), offset: (-3.5, -2.5, -3.0),
lateral: ("npc.salamander.male.foot_br"), lateral: ("npc.salamander.male.foot_br"),
), ),
), ),
(Salamander, Female): ( (Salamander, Female): (
front_left: ( front_left: (
offset: (-2.5, -4.0, -1.5), offset: (-3.0, -3.5, -3.0),
lateral: ("npc.salamander.female.foot_fl"), lateral: ("npc.salamander.female.foot_fl"),
), ),
front_right: ( front_right: (
offset: (-2.5, -4.0, -1.5), offset: (-3.0, -3.5, -3.0),
lateral: ("npc.salamander.female.foot_fr"), lateral: ("npc.salamander.female.foot_fr"),
), ),
back_left: ( back_left: (
offset: (-2.5, -4.0, -3.0), offset: (-3.5, -2.5, -3.0),
lateral: ("npc.salamander.female.foot_bl"), lateral: ("npc.salamander.female.foot_bl"),
), ),
back_right: ( back_right: (
offset: (-2.5, -4.0, -3.0), offset: (-3.5, -2.5, -3.0),
lateral: ("npc.salamander.female.foot_br"), lateral: ("npc.salamander.female.foot_br"),
), ),
), ),
(Monitor, Male): ( (Monitor, Male): (
front_left: ( front_left: (
offset: (-2.5, -4.0, -1.5), offset: (-4.0, -3.5, -5.0),
lateral: ("npc.monitor.male.foot_fl"), lateral: ("npc.monitor.male.foot_fl"),
), ),
front_right: ( front_right: (
offset: (-2.5, -4.0, -1.5), offset: (-4.0, -3.5, -5.0),
lateral: ("npc.monitor.male.foot_fr"), lateral: ("npc.monitor.male.foot_fr"),
), ),
back_left: ( back_left: (
offset: (-2.5, -4.0, -3.0), offset: (-3.5, -2.5, -5.0),
lateral: ("npc.monitor.male.foot_bl"), lateral: ("npc.monitor.male.foot_bl"),
), ),
back_right: ( back_right: (
offset: (-2.5, -4.0, -3.0), offset: (-3.5, -2.5, -5.0),
lateral: ("npc.monitor.male.foot_br"), lateral: ("npc.monitor.male.foot_br"),
), ),
), ),
(Monitor, Female): ( (Monitor, Female): (
front_left: ( front_left: (
offset: (-2.5, -4.0, -1.5), offset: (-4.0, -3.5, -5.0),
lateral: ("npc.monitor.female.foot_fl"), lateral: ("npc.monitor.female.foot_fl"),
), ),
front_right: ( front_right: (
offset: (-2.5, -4.0, -1.5), offset: (-4.0, -3.5, -5.0),
lateral: ("npc.monitor.female.foot_fr"), lateral: ("npc.monitor.female.foot_fr"),
), ),
back_left: ( back_left: (
offset: (-2.5, -4.0, -3.0), offset: (-3.5, -2.5, -5.0),
lateral: ("npc.monitor.female.foot_bl"), lateral: ("npc.monitor.female.foot_bl"),
), ),
back_right: ( back_right: (
offset: (-2.5, -4.0, -3.0), offset: (-3.5, -2.5, -5.0),
lateral: ("npc.monitor.female.foot_br"), lateral: ("npc.monitor.female.foot_br"),
), ),
), ),

View File

@ -17,9 +17,9 @@ impl Animation for IdleAnimation {
) -> Self::Skeleton { ) -> Self::Skeleton {
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
let ultra_slow = (anim_time as f32 * 1.0).sin(); let ultra_slow = 0.0*(anim_time as f32 * 1.0).sin();
let slow = (anim_time as f32 * 2.5).sin(); let slow = 0.0*(anim_time as f32 * 2.5).sin();
let slowalt = (anim_time as f32 * 2.5 + PI / 2.0).sin(); let slowalt = 0.0*(anim_time as f32 * 2.5 + PI / 2.0).sin();
let dragon_look = Vec2::new( let dragon_look = Vec2::new(
((global_time + anim_time) as f32 / 8.0) ((global_time + anim_time) as f32 / 8.0)
@ -49,29 +49,29 @@ impl Animation for IdleAnimation {
skeleton_attr.head_lower.1 + ultra_slow * 0.20, skeleton_attr.head_lower.1 + ultra_slow * 0.20,
); );
next.head_lower.ori = Quaternion::rotation_z(0.8 * dragon_look.x) next.head_lower.ori = Quaternion::rotation_z(0.8 * dragon_look.x)
* Quaternion::rotation_x(-0.2 + 0.8 * dragon_look.y); * Quaternion::rotation_x( 0.8 * dragon_look.y);
next.head_lower.scale = Vec3::one() * 1.05; next.head_lower.scale = Vec3::one();
next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1); next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
next.jaw.ori = Quaternion::rotation_x(slow * 0.04); next.jaw.ori = Quaternion::rotation_x(slow * 0.04);
next.jaw.scale = Vec3::one() * 1.05; next.jaw.scale = Vec3::one()*0.98;
next.chest.offset = Vec3::new( next.chest.offset = Vec3::new(
0.0, 0.0,
skeleton_attr.chest.0, skeleton_attr.chest.0,
skeleton_attr.chest.1, skeleton_attr.chest.1,
); )/6.0;
next.chest.ori = Quaternion::rotation_y(slow * 0.01); next.chest.ori = Quaternion::rotation_y(slow * 0.01);
next.chest.scale = Vec3::one() * 1.05; next.chest.scale = Vec3::one() /6.0;
next.tail_front.offset = next.tail_front.offset =
Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1); Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1);
next.tail_front.ori = Quaternion::rotation_z(slowalt * 0.10) * Quaternion::rotation_x(0.1); next.tail_front.ori = Quaternion::rotation_z(0.0);
next.tail_front.scale = Vec3::one()*0.98; next.tail_front.scale = Vec3::one()*0.98;
next.tail_rear.offset = next.tail_rear.offset =
Vec3::new(0.0, skeleton_attr.tail_rear.0, skeleton_attr.tail_rear.1); Vec3::new(0.0, skeleton_attr.tail_rear.0, skeleton_attr.tail_rear.1);
next.tail_rear.ori = Quaternion::rotation_z(slowalt * 0.12) * Quaternion::rotation_x(0.05); next.tail_rear.ori = Quaternion::rotation_z(slowalt * 0.12);
next.tail_rear.scale = Vec3::one()*0.98; next.tail_rear.scale = Vec3::one()*0.98;
next.foot_fl.offset = Vec3::new( next.foot_fl.offset = Vec3::new(

View File

@ -15,9 +15,9 @@ pub struct QuadrupedLowSkeleton {
head_upper: Bone, head_upper: Bone,
head_lower: Bone, head_lower: Bone,
jaw: Bone, jaw: Bone,
chest: Bone,
tail_front: Bone, tail_front: Bone,
tail_rear: Bone, tail_rear: Bone,
chest: Bone,
foot_fl: Bone, foot_fl: Bone,
foot_fr: Bone, foot_fr: Bone,
foot_bl: Bone, foot_bl: Bone,
@ -37,7 +37,6 @@ impl Skeleton for QuadrupedLowSkeleton {
let head_upper_mat = self.head_upper.compute_base_matrix(); let head_upper_mat = self.head_upper.compute_base_matrix();
let head_lower_mat = self.head_lower.compute_base_matrix(); let head_lower_mat = self.head_lower.compute_base_matrix();
let chest_mat = self.chest.compute_base_matrix(); let chest_mat = self.chest.compute_base_matrix();
let chest_mat = self.chest.compute_base_matrix();
( (
[ [
FigureBoneData::new(chest_mat * head_lower_mat * head_upper_mat), FigureBoneData::new(chest_mat * head_lower_mat * head_upper_mat),
@ -52,14 +51,13 @@ impl Skeleton for QuadrupedLowSkeleton {
FigureBoneData::new(chest_mat * self.tail_front.compute_base_matrix()), FigureBoneData::new(chest_mat * self.tail_front.compute_base_matrix()),
FigureBoneData::new( FigureBoneData::new(
chest_mat chest_mat
* chest_mat
* self.tail_front.compute_base_matrix() * self.tail_front.compute_base_matrix()
* self.tail_rear.compute_base_matrix(), * self.tail_rear.compute_base_matrix(),
), ),
FigureBoneData::new(self.foot_fl.compute_base_matrix()), FigureBoneData::new(chest_mat*self.foot_fl.compute_base_matrix()),
FigureBoneData::new(self.foot_fr.compute_base_matrix()), FigureBoneData::new(chest_mat*self.foot_fr.compute_base_matrix()),
FigureBoneData::new(self.foot_bl.compute_base_matrix()), FigureBoneData::new(chest_mat*self.foot_bl.compute_base_matrix()),
FigureBoneData::new(self.foot_br.compute_base_matrix()), FigureBoneData::new(chest_mat*self.foot_br.compute_base_matrix()),
FigureBoneData::default(), FigureBoneData::default(),
FigureBoneData::default(), FigureBoneData::default(),
FigureBoneData::default(), FigureBoneData::default(),
@ -75,9 +73,9 @@ impl Skeleton for QuadrupedLowSkeleton {
self.head_upper.interpolate(&target.head_upper, dt); self.head_upper.interpolate(&target.head_upper, dt);
self.head_lower.interpolate(&target.head_lower, dt); self.head_lower.interpolate(&target.head_lower, dt);
self.jaw.interpolate(&target.jaw, dt); self.jaw.interpolate(&target.jaw, dt);
self.chest.interpolate(&target.chest, dt);
self.tail_front.interpolate(&target.tail_front, dt); self.tail_front.interpolate(&target.tail_front, dt);
self.tail_rear.interpolate(&target.tail_rear, dt); self.tail_rear.interpolate(&target.tail_rear, dt);
self.chest.interpolate(&target.chest, dt);
self.foot_fl.interpolate(&target.foot_fl, dt); self.foot_fl.interpolate(&target.foot_fl, dt);
self.foot_fr.interpolate(&target.foot_fr, dt); self.foot_fr.interpolate(&target.foot_fr, dt);
self.foot_bl.interpolate(&target.foot_bl, dt); self.foot_bl.interpolate(&target.foot_bl, dt);
@ -89,9 +87,9 @@ pub struct SkeletonAttr {
head_upper: (f32, f32), head_upper: (f32, f32),
head_lower: (f32, f32), head_lower: (f32, f32),
jaw: (f32, f32), jaw: (f32, f32),
chest: (f32, f32),
tail_front: (f32, f32), tail_front: (f32, f32),
tail_rear: (f32, f32), tail_rear: (f32, f32),
chest: (f32, f32),
feet_f: (f32, f32, f32), feet_f: (f32, f32, f32),
feet_b: (f32, f32, f32), feet_b: (f32, f32, f32),
height: f32, height: f32,
@ -114,9 +112,9 @@ impl Default for SkeletonAttr {
head_upper: (0.0, 0.0), head_upper: (0.0, 0.0),
head_lower: (0.0, 0.0), head_lower: (0.0, 0.0),
jaw: (0.0, 0.0), jaw: (0.0, 0.0),
chest: (0.0, 0.0),
tail_front: (0.0, 0.0), tail_front: (0.0, 0.0),
tail_rear: (0.0, 0.0), tail_rear: (0.0, 0.0),
chest: (0.0, 0.0),
feet_f: (0.0, 0.0, 0.0), feet_f: (0.0, 0.0, 0.0),
feet_b: (0.0, 0.0, 0.0), feet_b: (0.0, 0.0, 0.0),
height: (0.0), height: (0.0),
@ -129,58 +127,58 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
use comp::quadruped_low::Species::*; use comp::quadruped_low::Species::*;
Self { Self {
head_upper: match (body.species, body.body_type) { head_upper: match (body.species, body.body_type) {
(Crocodile, _) => (12.0, 16.0), (Crocodile, _) => (8.0, 4.0),
(Alligator, _) => (12.0, 16.0), (Alligator, _) => (7.0, 4.0),
(Salamander, _) => (12.0, 16.0), (Salamander, _) => (3.0, 3.0),
(Monitor, _) => (12.0, 16.0), (Monitor, _) => (4.0, 2.0),
}, },
head_lower: match (body.species, body.body_type) { head_lower: match (body.species, body.body_type) {
(Crocodile, _) => (-4.0, -7.0), (Crocodile, _) => (8.0, 0.0),
(Alligator, _) => (-4.0, -7.0), (Alligator, _) => (7.0, 0.0),
(Salamander, _) => (-4.0, -7.0), (Salamander, _) => (10.0, 2.0),
(Monitor, _) => (-4.0, -7.0), (Monitor, _) => (10.0, 3.0),
}, },
jaw: match (body.species, body.body_type) { jaw: match (body.species, body.body_type) {
(Crocodile, _) => (3.0, -5.0), (Crocodile, _) => (0.0, -3.0),
(Alligator, _) => (3.0, -5.0), (Alligator, _) => (0.0, -2.0),
(Salamander, _) => (3.0, -5.0), (Salamander, _) => (2.0, -3.0),
(Monitor, _) => (3.0, -5.0), (Monitor, _) => (0.0, -1.0),
},
tail_rear: match (body.species, body.body_type) {
(Crocodile, _) => (-6.0, -2.0),
(Alligator, _) => (-6.0, -2.0),
(Salamander, _) => (-6.0, -2.0),
(Monitor, _) => (-6.0, -2.0),
},
tail_front: match (body.species, body.body_type) {
(Crocodile, _) => (-6.0, -2.0),
(Alligator, _) => (-6.0, -2.0),
(Salamander, _) => (-6.0, -2.0),
(Monitor, _) => (-6.0, -2.0),
}, },
chest: match (body.species, body.body_type) { chest: match (body.species, body.body_type) {
(Crocodile, _) => (4.0, 11.0), (Crocodile, _) => (0.0, 5.0),
(Alligator, _) => (4.0, 11.0), (Alligator, _) => (0.0, 5.0),
(Salamander, _) => (4.0, 11.0), (Salamander, _) => (0.0, 5.0),
(Monitor, _) => (4.0, 11.0), (Monitor, _) => (0.0, 5.0),
},
tail_rear: match (body.species, body.body_type) {
(Crocodile, _) => (-14.0, -1.0),
(Alligator, _) => (-13.0, -1.0),
(Salamander, _) => (-7.0, 0.0),
(Monitor, _) => (-5.0, 0.0),
},
tail_front: match (body.species, body.body_type) {
(Crocodile, _) => (-6.0, 0.0),
(Alligator, _) => (-5.0, 0.0),
(Salamander, _) => (-5.0, 0.0),
(Monitor, _) => (-5.0, 0.0),
}, },
feet_f: match (body.species, body.body_type) { feet_f: match (body.species, body.body_type) {
(Crocodile, _) => (5.0, 6.0, 2.0), (Crocodile, _) => (6.0, 6.0, 0.0),
(Alligator, _) => (5.0, 6.0, 2.0), (Alligator, _) => (6.0, 6.0, 0.0),
(Salamander, _) => (5.0, 6.0, 2.0), (Salamander, _) => (6.0, 6.0, -2.0),
(Monitor, _) => (5.0, 6.0, 2.0), (Monitor, _) => (6.0, 6.0, 0.0),
}, },
feet_b: match (body.species, body.body_type) { feet_b: match (body.species, body.body_type) {
(Crocodile, _) => (5.0, -4.0, 3.0), (Crocodile, _) => (6.0, -6.0, 0.0),
(Alligator, _) => (5.0, -4.0, 3.0), (Alligator, _) => (6.0, -6.0, 0.0),
(Salamander, _) => (5.0, -4.0, 3.0), (Salamander, _) => (6.0, -6.0, -2.0),
(Monitor, _) => (5.0, -4.0, 3.0), (Monitor, _) => (6.0, -6.0, 0.0),
}, },
height: match (body.species, body.body_type) { height: match (body.species, body.body_type) {
(Crocodile, _) => (1.2), (Crocodile, _) => (1.0),
(Alligator, _) => (1.2), (Alligator, _) => (1.0),
(Salamander, _) => (1.2), (Salamander, _) => (1.0),
(Monitor, _) => (1.2), (Monitor, _) => (1.0),
}, },
} }
} }

View File

@ -68,7 +68,7 @@ impl Animation for RunAnimation {
skeleton_attr.jaw.1 + wave_slow * 0.2, skeleton_attr.jaw.1 + wave_slow * 0.2,
); );
next.jaw.ori = Quaternion::rotation_x(wave_slow * 0.03); next.jaw.ori = Quaternion::rotation_x(wave_slow * 0.03);
next.jaw.scale = Vec3::one() * 1.05; next.jaw.scale = Vec3::one();
next.tail_front.offset = Vec3::new( next.tail_front.offset = Vec3::new(
0.0, 0.0,
@ -76,7 +76,7 @@ impl Animation for RunAnimation {
skeleton_attr.tail_front.1 + centeroffset * 0.6, skeleton_attr.tail_front.1 + centeroffset * 0.6,
); );
next.tail_front.ori = Quaternion::rotation_x(center * 0.03); next.tail_front.ori = Quaternion::rotation_x(center * 0.03);
next.tail_front.scale = Vec3::one() * 0.98; next.tail_front.scale = Vec3::one();
next.tail_rear.offset = Vec3::new( next.tail_rear.offset = Vec3::new(
0.0, 0.0,
@ -84,12 +84,12 @@ impl Animation for RunAnimation {
skeleton_attr.tail_rear.1 + centeroffset * 0.6, skeleton_attr.tail_rear.1 + centeroffset * 0.6,
); );
next.tail_rear.ori = Quaternion::rotation_x(center * 0.03); next.tail_rear.ori = Quaternion::rotation_x(center * 0.03);
next.tail_rear.scale = Vec3::one() * 0.98; next.tail_rear.scale = Vec3::one();
next.chest.offset = next.chest.offset =
Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1); Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1)/6.0;
next.chest.ori = Quaternion::rotation_y(horichest * -0.09); next.chest.ori = Quaternion::rotation_y(horichest * -0.09);
next.chest.scale = Vec3::one(); next.chest.scale = Vec3::one()/6.0;
next.foot_fl.offset = Vec3::new( next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0, -skeleton_attr.feet_f.0,

View File

@ -716,6 +716,11 @@ impl<Skel: Skeleton> FigureModelCache<Skel> {
body.body_type, body.body_type,
generate_mesh, generate_mesh,
)), )),
Some(quadruped_low_central_spec.mesh_chest(
body.species,
body.body_type,
generate_mesh,
)),
Some(quadruped_low_central_spec.mesh_tail_front( Some(quadruped_low_central_spec.mesh_tail_front(
body.species, body.species,
body.body_type, body.body_type,
@ -726,11 +731,6 @@ impl<Skel: Skeleton> FigureModelCache<Skel> {
body.body_type, body.body_type,
generate_mesh, generate_mesh,
)), )),
Some(quadruped_low_central_spec.mesh_chest(
body.species,
body.body_type,
generate_mesh,
)),
Some(quadruped_low_lateral_spec.mesh_foot_fl( Some(quadruped_low_lateral_spec.mesh_foot_fl(
body.species, body.species,
body.body_type, body.body_type,