Add alligator, salamander and monitor npcs

This commit is contained in:
Snowram 2020-06-04 23:15:38 +02:00 committed by jshipsey
parent 00b3301d6a
commit c527484597
81 changed files with 558 additions and 122 deletions

View File

@ -561,6 +561,18 @@
"crocodile": {
"keyword": "crocodile",
"generic": "Crocodile"
},
"alligator": {
"keyword": "alligator",
"generic": "Alligator"
},
"salamander": {
"keyword": "salamander",
"generic": "Salamander"
},
"monitor": {
"keyword": "monitor",
"generic": "Monitor"
}
}
}

BIN
assets/voxygen/voxel/npc/alligator/female/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/female/foot_bl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/female/foot_br.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/female/foot_fl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/female/foot_fr.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/female/head_lower.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/female/head_upper.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/female/jaw.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/female/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/female/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/foot_bl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/foot_br.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/foot_fl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/foot_fr.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/head_lower.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/head_upper.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/jaw.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/alligator/male/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/crocodile/female/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/npc/crocodile/female/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/crocodile/male/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/npc/crocodile/male/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/foot_bl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/foot_br.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/foot_fl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/foot_fr.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/head_lower.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/head_upper.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/jaw.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/female/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/foot_bl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/foot_br.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/foot_fl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/foot_fr.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/head_lower.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/head_upper.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/jaw.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/monitor/male/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/foot_bl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/foot_br.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/foot_fl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/foot_fr.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/head_lower.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/head_upper.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/jaw.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/female/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/chest.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/foot_bl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/foot_br.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/foot_fl.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/foot_fr.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/head_lower.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/head_upper.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/jaw.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/tail_front.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/npc/salamander/male/tail_rear.vox (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -12,21 +12,17 @@
offset: (-3.0, -3.0, -2.5),
central: ("npc.crocodile.male.jaw"),
),
chest_rear: (
chest: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.crocodile.male.chest_front"),
),
chest_front: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.crocodile.male.chest_front"),
central: ("npc.crocodile.male.chest"),
),
tail_rear: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.crocodile.male.tail"),
central: ("npc.crocodile.male.tail_rear"),
),
tail_front: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.crocodile.male.tail"),
central: ("npc.crocodile.male.tail_front"),
),
),
(Crocodile, Female): (
@ -42,21 +38,173 @@
offset: (-3.0, -3.0, -2.5),
central: ("npc.crocodile.female.jaw"),
),
chest_rear: (
chest: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.crocodile.female.chest_rear"),
),
chest_front: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.crocodile.female.chest_front"),
central: ("npc.crocodile.female.chest"),
),
tail_rear: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.crocodile.female.tail"),
central: ("npc.crocodile.female.tail_rear"),
),
tail_front: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.crocodile.female.tail"),
central: ("npc.crocodile.female.tail_front"),
),
),
(Alligator, Male): (
upper: (
offset: (-7.0, -9.0, -5.5),
central: ("npc.alligator.male.head_upper"),
),
lower: (
offset: (-7.0, -4.5, -5.0),
central: ("npc.alligator.male.head_lower"),
),
jaw: (
offset: (-3.0, -3.0, -2.5),
central: ("npc.alligator.male.jaw"),
),
chest: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.alligator.male.chest"),
),
tail_rear: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.alligator.male.tail_rear"),
),
tail_front: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.alligator.male.tail_front"),
),
),
(Alligator, Female): (
upper: (
offset: (-7.0, -9.0, -5.5),
central: ("npc.alligator.female.head_upper"),
),
lower: (
offset: (-7.0, -4.5, -5.0),
central: ("npc.alligator.female.head_lower"),
),
jaw: (
offset: (-3.0, -3.0, -2.5),
central: ("npc.alligator.female.jaw"),
),
chest: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.alligator.female.chest"),
),
tail_rear: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.alligator.female.tail_rear"),
),
tail_front: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.alligator.female.tail_front"),
),
),
(Salamander, Male): (
upper: (
offset: (-7.0, -9.0, -5.5),
central: ("npc.salamander.male.head_upper"),
),
lower: (
offset: (-7.0, -4.5, -5.0),
central: ("npc.salamander.male.head_lower"),
),
jaw: (
offset: (-3.0, -3.0, -2.5),
central: ("npc.salamander.male.jaw"),
),
chest: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.salamander.male.chest"),
),
tail_rear: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.salamander.male.tail_rear"),
),
tail_front: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.salamander.male.tail_front"),
),
),
(Salamander, Female): (
upper: (
offset: (-7.0, -9.0, -5.5),
central: ("npc.salamander.female.head_upper"),
),
lower: (
offset: (-7.0, -4.5, -5.0),
central: ("npc.salamander.female.head_lower"),
),
jaw: (
offset: (-3.0, -3.0, -2.5),
central: ("npc.salamander.female.jaw"),
),
chest: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.salamander.female.chest"),
),
tail_rear: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.salamander.female.tail_rear"),
),
tail_front: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.salamander.female.tail_front"),
),
),
(Monitor, Male): (
upper: (
offset: (-7.0, -9.0, -5.5),
central: ("npc.monitor.male.head_upper"),
),
lower: (
offset: (-7.0, -4.5, -5.0),
central: ("npc.monitor.male.head_lower"),
),
jaw: (
offset: (-3.0, -3.0, -2.5),
central: ("npc.monitor.male.jaw"),
),
chest: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.monitor.male.chest"),
),
tail_rear: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.monitor.male.tail_rear"),
),
tail_front: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.monitor.male.tail_front"),
),
),
(Monitor, Female): (
upper: (
offset: (-7.0, -9.0, -5.5),
central: ("npc.monitor.female.head_upper"),
),
lower: (
offset: (-7.0, -4.5, -5.0),
central: ("npc.monitor.female.head_lower"),
),
jaw: (
offset: (-3.0, -3.0, -2.5),
central: ("npc.monitor.female.jaw"),
),
chest: (
offset: (-8.0, -5.5, -6.0),
central: ("npc.monitor.female.chest"),
),
tail_rear: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.monitor.female.tail_rear"),
),
tail_front: (
offset: (-2.0, -9.5, -5.0),
central: ("npc.monitor.female.tail_front"),
),
),
})

View File

@ -35,4 +35,112 @@
lateral: ("npc.crocodile.female.foot_br"),
),
),
(Alligator, Male): (
front_left: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.alligator.male.foot_fl"),
),
front_right: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.alligator.male.foot_fr"),
),
back_left: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.alligator.male.foot_bl"),
),
back_right: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.alligator.male.foot_br"),
),
),
(Alligator, Female): (
front_left: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.alligator.female.foot_fl"),
),
front_right: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.alligator.female.foot_fr"),
),
back_left: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.alligator.female.foot_bl"),
),
back_right: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.alligator.female.foot_br"),
),
),
(Salamander, Male): (
front_left: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.salamander.male.foot_fl"),
),
front_right: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.salamander.male.foot_fr"),
),
back_left: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.salamander.male.foot_bl"),
),
back_right: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.salamander.male.foot_br"),
),
),
(Salamander, Female): (
front_left: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.salamander.female.foot_fl"),
),
front_right: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.salamander.female.foot_fr"),
),
back_left: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.salamander.female.foot_bl"),
),
back_right: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.salamander.female.foot_br"),
),
),
(Monitor, Male): (
front_left: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.monitor.male.foot_fl"),
),
front_right: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.monitor.male.foot_fr"),
),
back_left: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.monitor.male.foot_bl"),
),
back_right: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.monitor.male.foot_br"),
),
),
(Monitor, Female): (
front_left: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.monitor.female.foot_fl"),
),
front_right: (
offset: (-2.5, -4.0, -1.5),
lateral: ("npc.monitor.female.foot_fr"),
),
back_left: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.monitor.female.foot_bl"),
),
back_right: (
offset: (-2.5, -4.0, -3.0),
lateral: ("npc.monitor.female.foot_br"),
),
),
})

View File

@ -28,6 +28,9 @@ impl From<Body> for super::Body {
#[repr(u32)]
pub enum Species {
Crocodile = 0,
Alligator = 1,
Salamander = 2,
Monitor = 3,
}
/// Data representing per-species generic data.
@ -36,6 +39,9 @@ pub enum Species {
#[derive(Clone, Debug, Deserialize)]
pub struct AllSpecies<SpeciesMeta> {
pub crocodile: SpeciesMeta,
pub alligator: SpeciesMeta,
pub salamander: SpeciesMeta,
pub monitor: SpeciesMeta,
}
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
@ -45,12 +51,18 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
fn index(&self, &index: &'a Species) -> &Self::Output {
match index {
Species::Crocodile => &self.crocodile,
Species::Alligator => &self.alligator,
Species::Salamander => &self.salamander,
Species::Monitor => &self.monitor,
}
}
}
pub const ALL_SPECIES: [Species; 1] = [
pub const ALL_SPECIES: [Species; 4] = [
Species::Crocodile,
Species::Alligator,
Species::Salamander,
Species::Monitor,
];
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {

View File

@ -56,18 +56,13 @@ impl Animation for IdleAnimation {
next.jaw.ori = Quaternion::rotation_x(slow * 0.04);
next.jaw.scale = Vec3::one() * 1.05;
next.chest_front.offset = Vec3::new(
next.chest.offset = Vec3::new(
0.0,
skeleton_attr.chest_front.0,
skeleton_attr.chest_front.1,
skeleton_attr.chest.0,
skeleton_attr.chest.1,
);
next.chest_front.ori = Quaternion::rotation_y(slow * 0.01);
next.chest_front.scale = Vec3::one() * 1.05;
next.chest_rear.offset =
Vec3::new(0.0, skeleton_attr.chest_rear.0, skeleton_attr.chest_rear.1);
next.chest_rear.ori = Quaternion::rotation_y(slow * 0.01);
next.chest_rear.scale = Vec3::one() * 1.05;
next.chest.ori = Quaternion::rotation_y(slow * 0.01);
next.chest.scale = Vec3::one() * 1.05;
next.tail_front.offset =
Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1);

View File

@ -71,18 +71,13 @@ impl Animation for JumpAnimation {
next.tail_rear.ori = Quaternion::rotation_x(center * 0.03);
next.tail_rear.scale = Vec3::one() * 0.98;
next.chest_front.offset = Vec3::new(
next.chest.offset = Vec3::new(
0.0,
skeleton_attr.chest_front.0,
skeleton_attr.chest_front.1,
skeleton_attr.chest.0,
skeleton_attr.chest.1,
);
next.chest_front.ori = Quaternion::rotation_y(center * 0.05);
next.chest_front.scale = Vec3::one();
next.chest_rear.offset =
Vec3::new(0.0, skeleton_attr.chest_rear.0, skeleton_attr.chest_rear.1);
next.chest_rear.ori = Quaternion::rotation_y(center * 0.05);
next.chest_rear.scale = Vec3::one();
next.chest.ori = Quaternion::rotation_y(center * 0.05);
next.chest.scale = Vec3::one();
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,

View File

@ -17,8 +17,7 @@ pub struct QuadrupedLowSkeleton {
jaw: Bone,
tail_front: Bone,
tail_rear: Bone,
chest_front: Bone,
chest_rear: Bone,
chest: Bone,
foot_fl: Bone,
foot_fr: Bone,
foot_bl: Bone,
@ -32,29 +31,28 @@ impl QuadrupedLowSkeleton {
impl Skeleton for QuadrupedLowSkeleton {
type Attr = SkeletonAttr;
fn bone_count(&self) -> usize { 11 }
fn bone_count(&self) -> usize { 10 }
fn compute_matrices(&self) -> ([FigureBoneData; 16], Vec3<f32>) {
let head_upper_mat = self.head_upper.compute_base_matrix();
let head_lower_mat = self.head_lower.compute_base_matrix();
let chest_front_mat = self.chest_front.compute_base_matrix();
let chest_rear_mat = self.chest_rear.compute_base_matrix();
let chest_mat = self.chest.compute_base_matrix();
let chest_mat = self.chest.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_mat * head_lower_mat * head_upper_mat),
FigureBoneData::new(chest_mat * head_lower_mat),
FigureBoneData::new(
chest_front_mat
chest_mat
* head_lower_mat
* head_upper_mat
* self.jaw.compute_base_matrix(),
),
FigureBoneData::new(chest_front_mat),
FigureBoneData::new(chest_front_mat * self.chest_rear.compute_base_matrix()),
FigureBoneData::new(chest_front_mat * chest_rear_mat * self.tail_front.compute_base_matrix()),
FigureBoneData::new(chest_mat),
FigureBoneData::new(chest_mat * self.tail_front.compute_base_matrix()),
FigureBoneData::new(
chest_front_mat
* chest_rear_mat
chest_mat
* chest_mat
* self.tail_front.compute_base_matrix()
* self.tail_rear.compute_base_matrix(),
),
@ -67,6 +65,7 @@ impl Skeleton for QuadrupedLowSkeleton {
FigureBoneData::default(),
FigureBoneData::default(),
FigureBoneData::default(),
FigureBoneData::default(),
],
Vec3::default(),
)
@ -78,8 +77,7 @@ impl Skeleton for QuadrupedLowSkeleton {
self.jaw.interpolate(&target.jaw, dt);
self.tail_front.interpolate(&target.tail_front, dt);
self.tail_rear.interpolate(&target.tail_rear, dt);
self.chest_front.interpolate(&target.chest_front, dt);
self.chest_rear.interpolate(&target.chest_rear, dt);
self.chest.interpolate(&target.chest, dt);
self.foot_fl.interpolate(&target.foot_fl, dt);
self.foot_fr.interpolate(&target.foot_fr, dt);
self.foot_bl.interpolate(&target.foot_bl, dt);
@ -93,8 +91,7 @@ pub struct SkeletonAttr {
jaw: (f32, f32),
tail_front: (f32, f32),
tail_rear: (f32, f32),
chest_front: (f32, f32),
chest_rear: (f32, f32),
chest: (f32, f32),
feet_f: (f32, f32, f32),
feet_b: (f32, f32, f32),
height: f32,
@ -119,8 +116,7 @@ impl Default for SkeletonAttr {
jaw: (0.0, 0.0),
tail_front: (0.0, 0.0),
tail_rear: (0.0, 0.0),
chest_front: (0.0, 0.0),
chest_rear: (0.0, 0.0),
chest: (0.0, 0.0),
feet_f: (0.0, 0.0, 0.0),
feet_b: (0.0, 0.0, 0.0),
height: (0.0),
@ -134,33 +130,57 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
Self {
head_upper: match (body.species, body.body_type) {
(Crocodile, _) => (12.0, 16.0),
(Alligator, _) => (12.0, 16.0),
(Salamander, _) => (12.0, 16.0),
(Monitor, _) => (12.0, 16.0),
},
head_lower: match (body.species, body.body_type) {
(Crocodile, _) => (-4.0, -7.0),
(Alligator, _) => (-4.0, -7.0),
(Salamander, _) => (-4.0, -7.0),
(Monitor, _) => (-4.0, -7.0),
},
jaw: match (body.species, body.body_type) {
(Crocodile, _) => (3.0, -5.0),
(Alligator, _) => (3.0, -5.0),
(Salamander, _) => (3.0, -5.0),
(Monitor, _) => (3.0, -5.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_front: match (body.species, body.body_type) {
(Crocodile, _) => (4.0, 11.0),
},
chest_rear: match (body.species, body.body_type) {
chest: match (body.species, body.body_type) {
(Crocodile, _) => (4.0, 11.0),
(Alligator, _) => (4.0, 11.0),
(Salamander, _) => (4.0, 11.0),
(Monitor, _) => (4.0, 11.0),
},
feet_f: match (body.species, body.body_type) {
(Crocodile, _) => (5.0, 6.0, 2.0),
(Alligator, _) => (5.0, 6.0, 2.0),
(Salamander, _) => (5.0, 6.0, 2.0),
(Monitor, _) => (5.0, 6.0, 2.0),
},
feet_b: match (body.species, body.body_type) {
(Crocodile, _) => (5.0, -4.0, 3.0),
(Alligator, _) => (5.0, -4.0, 3.0),
(Salamander, _) => (5.0, -4.0, 3.0),
(Monitor, _) => (5.0, -4.0, 3.0),
},
height: match (body.species, body.body_type) {
(Crocodile, _) => (1.2),
(Alligator, _) => (1.2),
(Salamander, _) => (1.2),
(Monitor, _) => (1.2),
},
}
}

View File

@ -86,18 +86,10 @@ impl Animation for RunAnimation {
next.tail_rear.ori = Quaternion::rotation_x(center * 0.03);
next.tail_rear.scale = Vec3::one() * 0.98;
next.chest_front.offset = Vec3::new(
0.0,
skeleton_attr.chest_front.0 + horichest * 1.25,
skeleton_attr.chest_front.1 + vertchest * -1.6 + 1.0,
);
next.chest_front.ori = Quaternion::rotation_y(horichest * -0.09);
next.chest_front.scale = Vec3::one();
next.chest_rear.offset =
Vec3::new(0.0, skeleton_attr.chest_rear.0, skeleton_attr.chest_rear.1);
next.chest_rear.ori = Quaternion::rotation_y(horichest * -0.09);
next.chest_rear.scale = Vec3::one();
next.chest.offset =
Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1);
next.chest.ori = Quaternion::rotation_y(horichest * -0.09);
next.chest.scale = Vec3::one();
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,

View File

@ -56,10 +56,10 @@ impl Skeleton for QuadrupedMediumSkeleton {
FigureBoneData::new(self.leg_rf.compute_base_matrix()),
FigureBoneData::new(self.leg_lb.compute_base_matrix()),
FigureBoneData::new(self.leg_rb.compute_base_matrix()),
FigureBoneData::new(self.foot_lf.compute_base_matrix()),
FigureBoneData::new(self.foot_rf.compute_base_matrix()),
FigureBoneData::new(self.foot_lb.compute_base_matrix()),
FigureBoneData::new(self.foot_rb.compute_base_matrix()),
FigureBoneData::new(self.leg_lf.compute_base_matrix() * self.foot_lf.compute_base_matrix()),
FigureBoneData::new(self.leg_rf.compute_base_matrix() * self.foot_rf.compute_base_matrix()),
FigureBoneData::new(self.leg_lb.compute_base_matrix() * self.foot_lb.compute_base_matrix()),
FigureBoneData::new(self.leg_rb.compute_base_matrix() * self.foot_rb.compute_base_matrix()),
FigureBoneData::default(),
],
Vec3::default(),

View File

@ -726,12 +726,7 @@ impl<Skel: Skeleton> FigureModelCache<Skel> {
body.body_type,
generate_mesh,
)),
Some(quadruped_low_central_spec.mesh_chest_front(
body.species,
body.body_type,
generate_mesh,
)),
Some(quadruped_low_central_spec.mesh_chest_rear(
Some(quadruped_low_central_spec.mesh_chest(
body.species,
body.body_type,
generate_mesh,
@ -761,6 +756,7 @@ impl<Skel: Skeleton> FigureModelCache<Skel> {
None,
None,
None,
None,
]
},
Body::Object(object) => [

View File

@ -1579,7 +1579,7 @@ impl QuadrupedMediumLateralSpec {
Some(spec) => spec,
None => {
error!(
"No foot specification exists for the combination of {:?} and {:?}",
"No leg specification exists for the combination of {:?} and {:?}",
species, body_type
);
return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5), generate_mesh);
@ -3051,8 +3051,7 @@ struct SidedQLCentralVoxSpec {
upper: QuadrupedLowCentralSubSpec,
lower: QuadrupedLowCentralSubSpec,
jaw: QuadrupedLowCentralSubSpec,
chest_front: QuadrupedLowCentralSubSpec,
chest_rear: QuadrupedLowCentralSubSpec,
chest: QuadrupedLowCentralSubSpec,
tail_front: QuadrupedLowCentralSubSpec,
tail_rear: QuadrupedLowCentralSubSpec,
}
@ -3162,7 +3161,7 @@ impl QuadrupedLowCentralSpec {
generate_mesh(&central, Vec3::from(spec.jaw.offset))
}
pub fn mesh_chest_front(
pub fn mesh_chest(
&self,
species: QLSpecies,
body_type: QLBodyType,
@ -3172,36 +3171,15 @@ impl QuadrupedLowCentralSpec {
Some(spec) => spec,
None => {
error!(
"No chest_front specification exists for the combination of {:?} and {:?}",
"No chest specification exists for the combination of {:?} and {:?}",
species, body_type
);
return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5), generate_mesh);
},
};
let central = graceful_load_segment(&spec.chest_front.central.0);
let central = graceful_load_segment(&spec.chest.central.0);
generate_mesh(&central, Vec3::from(spec.chest_front.offset))
}
pub fn mesh_chest_rear(
&self,
species: QLSpecies,
body_type: QLBodyType,
generate_mesh: impl FnOnce(&Segment, Vec3<f32>) -> Mesh<FigurePipeline>,
) -> Mesh<FigurePipeline> {
let spec = match self.0.get(&(species, body_type)) {
Some(spec) => spec,
None => {
error!(
"No chest_rear specification exists for the combination of {:?} and {:?}",
species, body_type
);
return load_mesh("not_found", Vec3::new(-5.0, -5.0, -2.5), generate_mesh);
},
};
let central = graceful_load_segment(&spec.chest_rear.central.0);
generate_mesh(&central, Vec3::from(spec.chest_rear.offset))
generate_mesh(&central, Vec3::from(spec.chest.offset))
}
pub fn mesh_tail_rear(