mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'slipped/animtweaks' into 'master'
Slipped/animtweaks See merge request veloren/veloren!980
This commit is contained in:
commit
19a0ffb673
@ -243,9 +243,9 @@
|
||||
]
|
||||
},
|
||||
"species": {
|
||||
"wolf": {
|
||||
"keyword": "wolf",
|
||||
"generic": "Wolf"
|
||||
"grolgar": {
|
||||
"keyword": "grolgar",
|
||||
"generic": "Grolgar"
|
||||
},
|
||||
"saber": {
|
||||
"keyword": "sabertooth",
|
||||
@ -493,6 +493,10 @@
|
||||
"ogre": {
|
||||
"keyword": "ogre",
|
||||
"generic": "Ogre"
|
||||
},
|
||||
"cyclops": {
|
||||
"keyword": "cyclops",
|
||||
"generic": "Cyclops"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -27,4 +27,32 @@
|
||||
center: ("npc.ogre.female.torso_lower"),
|
||||
)
|
||||
),
|
||||
(Cyclops, Male): (
|
||||
head: (
|
||||
offset: (-7.0, -7.0, -6.5),
|
||||
center: ("npc.cyclops.male.head"),
|
||||
),
|
||||
torso_upper: (
|
||||
offset: (-8.0, -6.0, -6.0),
|
||||
center: ("npc.cyclops.male.torso_upper"),
|
||||
),
|
||||
torso_lower: (
|
||||
offset: (-6.0, -5.5, -6.0),
|
||||
center: ("npc.cyclops.male.torso_lower"),
|
||||
)
|
||||
),
|
||||
(Cyclops, Female): (
|
||||
head: (
|
||||
offset: (-7.0, -7.0, -6.5),
|
||||
center: ("npc.cyclops.female.head"),
|
||||
),
|
||||
torso_upper: (
|
||||
offset: (-8.0, -6.0, -6.0),
|
||||
center: ("npc.cyclops.female.torso_upper"),
|
||||
),
|
||||
torso_lower: (
|
||||
offset: (-6.0, -5.5, -6.0),
|
||||
center: ("npc.cyclops.female.torso_lower"),
|
||||
)
|
||||
),
|
||||
})
|
||||
|
@ -67,4 +67,72 @@
|
||||
lateral: ("npc.ogre.female.foot_r"),
|
||||
)
|
||||
),
|
||||
(Cyclops, Male): (
|
||||
shoulder_l: (
|
||||
offset: (-3.0, -4.0, -5.0),
|
||||
lateral: ("npc.cyclops.male.shoulder_l"),
|
||||
),
|
||||
shoulder_r: (
|
||||
offset: (-3.0, -4.0, -5.0),
|
||||
lateral: ("npc.cyclops.male.shoulder_r"),
|
||||
),
|
||||
hand_l: (
|
||||
offset: (-3.5, -3.5, -14.0),
|
||||
lateral: ("npc.cyclops.male.hand_l"),
|
||||
),
|
||||
hand_r: (
|
||||
offset: (-3.5, -3.5, -14.0),
|
||||
lateral: ("npc.cyclops.male.hand_r"),
|
||||
),
|
||||
leg_l: (
|
||||
offset: (-6.0, -3.5, -7.0),
|
||||
lateral: ("npc.cyclops.male.leg_l"),
|
||||
),
|
||||
leg_r: (
|
||||
offset: (0.0, -3.5, -7.0),
|
||||
lateral: ("npc.cyclops.male.leg_r"),
|
||||
),
|
||||
foot_l: (
|
||||
offset: (-3.0, -5.0, -5.0),
|
||||
lateral: ("npc.cyclops.male.foot_l"),
|
||||
),
|
||||
foot_r: (
|
||||
offset: (-3.0, -5.0, -5.0),
|
||||
lateral: ("npc.cyclops.male.foot_r"),
|
||||
)
|
||||
),
|
||||
(Cyclops, Female): (
|
||||
shoulder_l: (
|
||||
offset: (-3.0, -4.0, -5.0),
|
||||
lateral: ("npc.cyclops.female.shoulder_l"),
|
||||
),
|
||||
shoulder_r: (
|
||||
offset: (-3.0, -4.0, -5.0),
|
||||
lateral: ("npc.cyclops.female.shoulder_r"),
|
||||
),
|
||||
hand_l: (
|
||||
offset: (-3.5, -3.5, -14.0),
|
||||
lateral: ("npc.cyclops.female.hand_l"),
|
||||
),
|
||||
hand_r: (
|
||||
offset: (-3.5, -3.5, -14.0),
|
||||
lateral: ("npc.cyclops.female.hand_r"),
|
||||
),
|
||||
leg_l: (
|
||||
offset: (-6.0, -3.5, -7.0),
|
||||
lateral: ("npc.cyclops.female.leg_l"),
|
||||
),
|
||||
leg_r: (
|
||||
offset: (0.0, -3.5, -7.0),
|
||||
lateral: ("npc.cyclops.female.leg_r"),
|
||||
),
|
||||
foot_l: (
|
||||
offset: (-3.0, -5.0, -5.0),
|
||||
lateral: ("npc.cyclops.female.foot_l"),
|
||||
),
|
||||
foot_r: (
|
||||
offset: (-3.0, -5.0, -5.0),
|
||||
lateral: ("npc.cyclops.female.foot_r"),
|
||||
)
|
||||
),
|
||||
})
|
||||
|
BIN
assets/voxygen/voxel/npc/cyclops/female/foot_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/foot_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/foot_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/foot_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/hammer.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/hammer.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/hand_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/hand_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/hand_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/hand_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/head.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/head.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/leg_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/leg_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/leg_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/leg_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/shoulder_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/shoulder_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/shoulder_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/shoulder_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/torso_lower.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/torso_lower.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/female/torso_upper.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/female/torso_upper.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/foot_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/foot_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/foot_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/foot_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/hammer.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/hammer.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/hand_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/hand_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/hand_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/hand_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/head.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/head.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/leg_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/leg_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/leg_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/leg_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/shoulder_l.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/shoulder_l.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/shoulder_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/shoulder_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/torso_lower.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/torso_lower.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/cyclops/male/torso_upper.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/cyclops/male/torso_upper.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,62 +1,62 @@
|
||||
({
|
||||
(Wolf, Male): (
|
||||
(Grolgar, Male): (
|
||||
upper: (
|
||||
offset: (-7.0, -9.0, -5.5),
|
||||
central: ("npc.wolf.male.head_upper"),
|
||||
central: ("npc.grolgar.male.head_upper"),
|
||||
),
|
||||
lower: (
|
||||
offset: (-7.0, -4.5, -5.0),
|
||||
central: ("npc.wolf.male.head_lower"),
|
||||
central: ("npc.grolgar.male.head_lower"),
|
||||
),
|
||||
jaw: (
|
||||
offset: (-3.0, -3.0, -2.5),
|
||||
central: ("npc.wolf.male.jaw"),
|
||||
central: ("npc.grolgar.male.jaw"),
|
||||
),
|
||||
torso_f: (
|
||||
offset: (-8.0, -5.5, -6.0),
|
||||
central: ("npc.wolf.male.torso_front"),
|
||||
central: ("npc.grolgar.male.torso_front"),
|
||||
),
|
||||
torso_b: (
|
||||
offset: (-7.0, -6.0, -6.0),
|
||||
central: ("npc.wolf.male.torso_back"),
|
||||
central: ("npc.grolgar.male.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.0, -1.0, -1.5),
|
||||
central: ("npc.wolf.male.ears"),
|
||||
central: ("npc.grolgar.male.ears"),
|
||||
),
|
||||
tail: (
|
||||
offset: (-2.0, -9.5, -5.0),
|
||||
central: ("npc.wolf.male.tail"),
|
||||
central: ("npc.grolgar.male.tail"),
|
||||
),
|
||||
),
|
||||
(Wolf, Female): (
|
||||
(Grolgar, Female): (
|
||||
upper: (
|
||||
offset: (-7.0, -9.0, -5.5),
|
||||
central: ("npc.wolf.female.head_upper"),
|
||||
central: ("npc.grolgar.female.head_upper"),
|
||||
),
|
||||
lower: (
|
||||
offset: (-7.0, -4.5, -5.0),
|
||||
central: ("npc.wolf.female.head_lower"),
|
||||
central: ("npc.grolgar.female.head_lower"),
|
||||
),
|
||||
jaw: (
|
||||
offset: (-3.0, -3.0, -2.5),
|
||||
central: ("npc.wolf.male.jaw"),
|
||||
central: ("npc.grolgar.male.jaw"),
|
||||
),
|
||||
torso_f: (
|
||||
offset: (-8.0, -5.5, -6.0),
|
||||
central: ("npc.wolf.female.torso_front"),
|
||||
central: ("npc.grolgar.female.torso_front"),
|
||||
),
|
||||
torso_b: (
|
||||
offset: (-7.0, -6.0, -6.0),
|
||||
central: ("npc.wolf.female.torso_back"),
|
||||
central: ("npc.grolgar.female.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.0, -1.0, -1.5),
|
||||
central: ("npc.wolf.female.ears"),
|
||||
central: ("npc.grolgar.female.ears"),
|
||||
),
|
||||
tail: (
|
||||
offset: (-2.0, -9.5, -5.0),
|
||||
central: ("npc.wolf.female.tail"),
|
||||
central: ("npc.grolgar.female.tail"),
|
||||
),
|
||||
),
|
||||
|
||||
|
@ -1,38 +1,38 @@
|
||||
({
|
||||
(Wolf, Male): (
|
||||
(Grolgar, Male): (
|
||||
left_front: (
|
||||
offset: (-2.5, -4.0, -1.5),
|
||||
lateral: ("npc.wolf.male.foot_lf"),
|
||||
lateral: ("npc.grolgar.male.foot_lf"),
|
||||
),
|
||||
right_front: (
|
||||
offset: (-2.5, -4.0, -1.5),
|
||||
lateral: ("npc.wolf.male.foot_rf"),
|
||||
lateral: ("npc.grolgar.male.foot_rf"),
|
||||
),
|
||||
left_back: (
|
||||
offset: (-2.5, -4.0, -3.0),
|
||||
lateral: ("npc.wolf.male.foot_lb"),
|
||||
lateral: ("npc.grolgar.male.foot_lb"),
|
||||
),
|
||||
right_back: (
|
||||
offset: (-2.5, -4.0, -3.0),
|
||||
lateral: ("npc.wolf.male.foot_rb"),
|
||||
lateral: ("npc.grolgar.male.foot_rb"),
|
||||
),
|
||||
),
|
||||
(Wolf, Female): (
|
||||
(Grolgar, Female): (
|
||||
left_front: (
|
||||
offset: (-2.5, -4.0, -1.5),
|
||||
lateral: ("npc.wolf.female.foot_lf"),
|
||||
lateral: ("npc.grolgar.female.foot_lf"),
|
||||
),
|
||||
right_front: (
|
||||
offset: (-2.5, -4.0, -1.5),
|
||||
lateral: ("npc.wolf.female.foot_rf"),
|
||||
lateral: ("npc.grolgar.female.foot_rf"),
|
||||
),
|
||||
left_back: (
|
||||
offset: (-2.5, -4.0, -3.0),
|
||||
lateral: ("npc.wolf.female.foot_lb"),
|
||||
lateral: ("npc.grolgar.female.foot_lb"),
|
||||
),
|
||||
right_back: (
|
||||
offset: (-2.5, -4.0, -3.0),
|
||||
lateral: ("npc.wolf.female.foot_rb"),
|
||||
lateral: ("npc.grolgar.female.foot_rb"),
|
||||
),
|
||||
),
|
||||
(Saber, Male): (
|
||||
|
@ -28,6 +28,7 @@ impl From<Body> for super::Body {
|
||||
#[repr(u32)]
|
||||
pub enum Species {
|
||||
Ogre = 0,
|
||||
Cyclops = 1,
|
||||
}
|
||||
|
||||
/// Data representing per-species generic data.
|
||||
@ -36,6 +37,7 @@ pub enum Species {
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct AllSpecies<SpeciesMeta> {
|
||||
pub ogre: SpeciesMeta,
|
||||
pub cyclops: SpeciesMeta,
|
||||
}
|
||||
|
||||
impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta> {
|
||||
@ -45,11 +47,12 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
|
||||
fn index(&self, &index: &'a Species) -> &Self::Output {
|
||||
match index {
|
||||
Species::Ogre => &self.ogre,
|
||||
Species::Cyclops => &self.cyclops,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub const ALL_SPECIES: [Species; 1] = [Species::Ogre];
|
||||
pub const ALL_SPECIES: [Species; 2] = [Species::Ogre, Species::Cyclops];
|
||||
|
||||
impl<'a, SpeciesMeta: 'a> IntoIterator for &'a AllSpecies<SpeciesMeta> {
|
||||
type Item = Species;
|
||||
|
@ -27,7 +27,7 @@ impl From<Body> for super::Body {
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
#[repr(u32)]
|
||||
pub enum Species {
|
||||
Wolf = 0,
|
||||
Grolgar = 0,
|
||||
Saber = 1,
|
||||
Viper = 2,
|
||||
Tuskram = 3,
|
||||
@ -42,7 +42,7 @@ pub enum Species {
|
||||
/// NOTE: Deliberately don't (yet?) implement serialize.
|
||||
#[derive(Clone, Debug, Deserialize)]
|
||||
pub struct AllSpecies<SpeciesMeta> {
|
||||
pub wolf: SpeciesMeta,
|
||||
pub grolgar: SpeciesMeta,
|
||||
pub saber: SpeciesMeta,
|
||||
pub viper: SpeciesMeta,
|
||||
pub tuskram: SpeciesMeta,
|
||||
@ -58,7 +58,7 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
|
||||
#[inline]
|
||||
fn index(&self, &index: &'a Species) -> &Self::Output {
|
||||
match index {
|
||||
Species::Wolf => &self.wolf,
|
||||
Species::Grolgar => &self.grolgar,
|
||||
Species::Saber => &self.saber,
|
||||
Species::Viper => &self.viper,
|
||||
Species::Tuskram => &self.tuskram,
|
||||
@ -71,7 +71,7 @@ impl<'a, SpeciesMeta> core::ops::Index<&'a Species> for AllSpecies<SpeciesMeta>
|
||||
}
|
||||
|
||||
pub const ALL_SPECIES: [Species; 8] = [
|
||||
Species::Wolf,
|
||||
Species::Grolgar,
|
||||
Species::Saber,
|
||||
Species::Viper,
|
||||
Species::Tuskram,
|
||||
|
@ -128,24 +128,31 @@ impl<'a> From<&'a comp::biped_large::Body> for SkeletonAttr {
|
||||
Self {
|
||||
head: match (body.species, body.body_type) {
|
||||
(Ogre, _) => (3.0, 6.0),
|
||||
(Cyclops, _) => (3.0, 9.0),
|
||||
},
|
||||
upper_torso: match (body.species, body.body_type) {
|
||||
(Ogre, _) => (0.0, 19.0),
|
||||
(Cyclops, _) => (-1.0, 27.0),
|
||||
},
|
||||
lower_torso: match (body.species, body.body_type) {
|
||||
(Ogre, _) => (1.0, -9.5),
|
||||
(Cyclops, _) => (1.0, -10.5),
|
||||
},
|
||||
shoulder: match (body.species, body.body_type) {
|
||||
(Ogre, _) => (6.1, 0.5, 2.5),
|
||||
(Cyclops, _) => (9.5, 0.5, 2.5),
|
||||
},
|
||||
hand: match (body.species, body.body_type) {
|
||||
(Ogre, _) => (10.5, -1.0, -0.5),
|
||||
(Cyclops, _) => (10.5, 0.0, -0.5),
|
||||
},
|
||||
leg: match (body.species, body.body_type) {
|
||||
(Ogre, _) => (0.0, 0.0, -6.0),
|
||||
(Cyclops, _) => (0.0, 0.0, -9.0),
|
||||
},
|
||||
foot: match (body.species, body.body_type) {
|
||||
(Ogre, _) => (4.0, 0.5, 2.5),
|
||||
(Ogre, _) => (4.0, 0.5, 5.5),
|
||||
(Cyclops, _) => (4.0, 0.5, 5.0),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ impl Animation for SitAnimation {
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.ori = Quaternion::rotation_x(slow * 0.1 + stop * 1.2 + slow * 0.1);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
|
||||
next.r_foot.offset = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
@ -96,6 +97,7 @@ impl Animation for SitAnimation {
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.ori = Quaternion::rotation_x(slowa * 0.1 + stop * 1.2 + slowa * 0.1);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.offset = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
|
@ -59,9 +59,11 @@ impl Animation for SwimAnimation {
|
||||
skeleton_attr.chest.1 + short * 1.3,
|
||||
);
|
||||
next.chest.ori = Quaternion::rotation_z(short * 0.4);
|
||||
next.chest.scale = Vec3::one();
|
||||
|
||||
next.belt.offset = Vec3::new(0.0, skeleton_attr.belt.0, skeleton_attr.belt.1);
|
||||
next.belt.ori = Quaternion::rotation_z(short * 0.30);
|
||||
next.belt.scale = Vec3::one();
|
||||
|
||||
next.back.offset = Vec3::new(0.0, skeleton_attr.back.0, skeleton_attr.back.1);
|
||||
next.back.ori = Quaternion::rotation_z(0.0);
|
||||
@ -69,6 +71,7 @@ impl Animation for SwimAnimation {
|
||||
|
||||
next.shorts.offset = Vec3::new(0.0, skeleton_attr.shorts.0, skeleton_attr.shorts.1);
|
||||
next.shorts.ori = Quaternion::rotation_z(short * 0.5);
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
next.l_hand.offset = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
@ -76,6 +79,7 @@ impl Animation for SwimAnimation {
|
||||
skeleton_attr.hand.2 + foot * -3.0,
|
||||
);
|
||||
next.l_hand.ori = Quaternion::rotation_x(0.8 + foot * -0.6) * Quaternion::rotation_y(0.2);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
|
||||
next.r_hand.offset = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
@ -83,6 +87,7 @@ impl Animation for SwimAnimation {
|
||||
skeleton_attr.hand.2 + foot * 3.0,
|
||||
);
|
||||
next.r_hand.ori = Quaternion::rotation_x(0.8 + foot * 0.6) * Quaternion::rotation_y(-0.2);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
|
||||
next.l_foot.offset = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
@ -90,6 +95,7 @@ impl Animation for SwimAnimation {
|
||||
-5.0 + skeleton_attr.foot.2 + foot * 6.5,
|
||||
);
|
||||
next.l_foot.ori = Quaternion::rotation_x(-1.40 + foot * 0.6);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
|
||||
next.r_foot.offset = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
@ -97,6 +103,7 @@ impl Animation for SwimAnimation {
|
||||
-5.0 + skeleton_attr.foot.2 + foot * -6.5,
|
||||
);
|
||||
next.r_foot.ori = Quaternion::rotation_x(-1.40 + foot * -0.6);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.offset = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
|
@ -13,28 +13,28 @@ impl Animation for JumpAnimation {
|
||||
_global_time: Self::Dependency,
|
||||
_anim_time: f64,
|
||||
_rate: &mut f32,
|
||||
_skeleton_attr: &CritterAttr,
|
||||
skeleton_attr: &CritterAttr,
|
||||
) -> Self::Skeleton {
|
||||
let mut next = (*skeleton).clone();
|
||||
|
||||
next.head.offset = Vec3::new(0.0, 0.0, 0.0) / 18.0;
|
||||
next.head.ori = Quaternion::rotation_z(0.0);
|
||||
next.head.offset = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1) / 18.0;
|
||||
next.head.ori = Quaternion::rotation_z(0.8) * Quaternion::rotation_x(0.5);
|
||||
next.head.scale = Vec3::one() / 18.0;
|
||||
|
||||
next.chest.offset = Vec3::new(0.0, 0.0, 0.0) / 18.0;
|
||||
next.chest.ori = Quaternion::rotation_x(0.0);
|
||||
next.chest.offset = Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1) / 18.0;
|
||||
next.chest.ori = Quaternion::rotation_y(0.0);
|
||||
next.chest.scale = Vec3::one() / 18.0;
|
||||
|
||||
next.feet_f.offset = Vec3::new(0.0, 0.0, 0.0) / 18.0;
|
||||
next.feet_f.offset = Vec3::new(0.0, skeleton_attr.feet_f.0, skeleton_attr.feet_f.1) / 18.0;
|
||||
next.feet_f.ori = Quaternion::rotation_z(0.0);
|
||||
next.feet_f.scale = Vec3::one() / 18.0;
|
||||
|
||||
next.feet_b.offset = Vec3::new(0.0, 0.0, 0.0) / 18.0;
|
||||
next.feet_b.offset = Vec3::new(0.0, skeleton_attr.feet_b.0, skeleton_attr.feet_b.1) / 18.0;
|
||||
next.feet_b.ori = Quaternion::rotation_x(0.0);
|
||||
next.feet_b.scale = Vec3::one() / 18.0;
|
||||
|
||||
next.tail.offset = Vec3::new(0.0, 0.0, 0.0) / 18.0;
|
||||
next.tail.ori = Quaternion::rotation_x(0.0);
|
||||
next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1) / 18.0;
|
||||
next.tail.ori = Quaternion::rotation_y(0.0);
|
||||
next.tail.scale = Vec3::one() / 18.0;
|
||||
|
||||
next
|
||||
|
@ -1,5 +1,4 @@
|
||||
use super::{super::Animation, QuadrupedMediumSkeleton, SkeletonAttr};
|
||||
use std::f32::consts::PI;
|
||||
use vek::*;
|
||||
|
||||
pub struct JumpAnimation;
|
||||
@ -11,61 +10,82 @@ impl Animation for JumpAnimation {
|
||||
fn update_skeleton(
|
||||
skeleton: &Self::Skeleton,
|
||||
_global_time: Self::Dependency,
|
||||
anim_time: f64,
|
||||
_anim_time: f64,
|
||||
_rate: &mut f32,
|
||||
_skeleton_attr: &SkeletonAttr,
|
||||
skeleton_attr: &SkeletonAttr,
|
||||
) -> Self::Skeleton {
|
||||
let mut next = (*skeleton).clone();
|
||||
|
||||
let wave = (anim_time as f32 * 14.0).sin();
|
||||
let wave_slow = (anim_time as f32 * 3.5 + PI).sin();
|
||||
let wave_stop = (anim_time as f32 * 5.0).min(PI / 2.0).sin();
|
||||
next.head_upper.offset = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.head_upper.0,
|
||||
skeleton_attr.head_upper.1 + 3.0,
|
||||
) / 11.0;
|
||||
next.head_upper.ori = Quaternion::rotation_z(0.8) * Quaternion::rotation_x(0.5);
|
||||
next.head_upper.scale = Vec3::one() / 10.98;
|
||||
|
||||
next.head_upper.offset = Vec3::new(0.0, 7.5, 15.0 + wave_stop * 4.8) / 11.0;
|
||||
next.head_upper.ori =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(wave_slow * -0.25);
|
||||
next.head_upper.scale = Vec3::one() / 10.88;
|
||||
next.head_lower.offset =
|
||||
Vec3::new(0.0, skeleton_attr.head_lower.0, skeleton_attr.head_lower.1);
|
||||
next.head_lower.ori = Quaternion::rotation_x(-0.4);
|
||||
next.head_lower.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.head_lower.offset = Vec3::new(0.0, 3.1, -4.5);
|
||||
next.head_lower.ori = Quaternion::rotation_x(wave_stop * -0.1);
|
||||
next.head_lower.scale = Vec3::one() * 0.98;
|
||||
|
||||
next.jaw.offset = Vec3::new(0.0, 4.5, 2.0);
|
||||
next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
|
||||
next.jaw.ori = Quaternion::rotation_x(0.0);
|
||||
next.jaw.scale = Vec3::one() * 1.01;
|
||||
next.jaw.scale = Vec3::one() * 0.98;
|
||||
|
||||
next.tail.offset = Vec3::new(0.0, -12.0, 8.0) / 11.0;
|
||||
next.tail.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(wave_slow * -0.25);
|
||||
next.tail.scale = Vec3::one() / 11.0;
|
||||
next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1);
|
||||
next.tail.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.tail.scale = Vec3::one();
|
||||
|
||||
next.torso_back.offset =
|
||||
Vec3::new(0.0, -9.5 + wave_stop * 1.0, 11.0 + wave_stop * 2.2) / 11.0;
|
||||
next.torso_back.ori = Quaternion::rotation_x(wave_slow * -0.25);
|
||||
next.torso_back.offset = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.torso_back.0,
|
||||
skeleton_attr.torso_back.1 + 2.0,
|
||||
) / 11.0;
|
||||
next.torso_back.ori = Quaternion::rotation_z(-0.8)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_x(0.2);
|
||||
next.torso_back.scale = Vec3::one() / 11.0;
|
||||
|
||||
next.torso_mid.offset = Vec3::new(0.0, 0.0, 12.0 + wave_stop * 3.6) / 11.0;
|
||||
next.torso_mid.ori = Quaternion::rotation_x(wave_slow * -0.25);
|
||||
next.torso_mid.scale = Vec3::one() / 10.5;
|
||||
next.torso_mid.offset =
|
||||
Vec3::new(0.0, skeleton_attr.torso_mid.0, skeleton_attr.torso_mid.1) / 11.0;
|
||||
next.torso_mid.ori = Quaternion::rotation_x(-0.4);
|
||||
next.torso_mid.scale = Vec3::one() / 10.98;
|
||||
|
||||
next.ears.offset = Vec3::new(0.0, 0.75, 6.25);
|
||||
next.ears.offset = Vec3::new(0.0, skeleton_attr.ears.0, skeleton_attr.ears.1);
|
||||
next.ears.ori = Quaternion::rotation_x(0.0);
|
||||
next.ears.scale = Vec3::one() * 1.05;
|
||||
next.ears.scale = Vec3::one() / 1.02;
|
||||
|
||||
next.foot_lf.offset = Vec3::new(-5.0, 5.0 + wave_stop * 3.0, 5.0 + wave_stop * 7.0) / 11.0;
|
||||
next.foot_lf.ori = Quaternion::rotation_x(wave_stop * 1.0 + wave * 0.15);
|
||||
next.foot_lf.offset = Vec3::new(
|
||||
-skeleton_attr.feet_f.0,
|
||||
skeleton_attr.feet_f.1,
|
||||
skeleton_attr.feet_f.2,
|
||||
) / 11.0;
|
||||
next.foot_lf.ori = Quaternion::rotation_x(0.0);
|
||||
next.foot_lf.scale = Vec3::one() / 11.0;
|
||||
|
||||
next.foot_rf.offset = Vec3::new(5.0, 5.0 - wave_stop * 3.0, 5.0 + wave_stop * 5.0) / 11.0;
|
||||
next.foot_rf.ori = Quaternion::rotation_x(wave_stop * -1.0 + wave * 0.15);
|
||||
next.foot_rf.offset = Vec3::new(
|
||||
skeleton_attr.feet_f.0,
|
||||
skeleton_attr.feet_f.1,
|
||||
skeleton_attr.feet_f.2,
|
||||
) / 11.0;
|
||||
next.foot_rf.ori = Quaternion::rotation_x(0.0);
|
||||
next.foot_rf.scale = Vec3::one() / 11.0;
|
||||
|
||||
next.foot_lb.offset =
|
||||
Vec3::new(-5.0, -10.0 - wave_stop * 2.0, 5.0 + wave_stop * 0.0) / 11.0;
|
||||
next.foot_lb.ori = Quaternion::rotation_x(wave_stop * -1.0 + wave * 0.15);
|
||||
next.foot_lb.offset = Vec3::new(
|
||||
-skeleton_attr.feet_b.0,
|
||||
skeleton_attr.feet_b.1,
|
||||
skeleton_attr.feet_b.2,
|
||||
) / 11.0;
|
||||
next.foot_lb.ori = Quaternion::rotation_x(0.0);
|
||||
next.foot_lb.scale = Vec3::one() / 11.0;
|
||||
|
||||
next.foot_rb.offset = Vec3::new(5.0, -10.0 + wave_stop * 2.0, 5.0 + wave_stop * 2.0) / 11.0;
|
||||
next.foot_rb.ori = Quaternion::rotation_x(wave_stop * 1.0 + wave * 0.15);
|
||||
next.foot_rb.offset = Vec3::new(
|
||||
skeleton_attr.feet_b.0,
|
||||
skeleton_attr.feet_b.1,
|
||||
skeleton_attr.feet_b.2,
|
||||
) / 11.0;
|
||||
next.foot_rb.ori = Quaternion::rotation_x(0.0);
|
||||
next.foot_rb.scale = Vec3::one() / 11.0;
|
||||
|
||||
next
|
||||
|
@ -123,7 +123,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
use comp::quadruped_medium::Species::*;
|
||||
Self {
|
||||
head_upper: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (12.0, 16.0),
|
||||
(Grolgar, _) => (12.0, 16.0),
|
||||
(Saber, _) => (14.0, 12.0),
|
||||
(Viper, _) => (14.0, 10.0),
|
||||
(Tuskram, _) => (9.0, 12.0),
|
||||
@ -133,7 +133,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tarasque, _) => (12.0, 19.0),
|
||||
},
|
||||
head_lower: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (-4.0, -7.0),
|
||||
(Grolgar, _) => (-4.0, -7.0),
|
||||
(Saber, _) => (-6.0, 0.0),
|
||||
(Viper, _) => (-3.0, -1.0),
|
||||
(Tuskram, _) => (-3.0, -1.0),
|
||||
@ -143,7 +143,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tarasque, _) => (-5.0, -6.0),
|
||||
},
|
||||
jaw: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (3.0, -5.0),
|
||||
(Grolgar, _) => (3.0, -5.0),
|
||||
(Saber, _) => (2.0, -1.0),
|
||||
(Viper, _) => (3.0, -2.0),
|
||||
(Tuskram, _) => (2.0, -2.0),
|
||||
@ -153,7 +153,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tarasque, _) => (4.0, -9.0),
|
||||
},
|
||||
tail: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (-6.0, -2.0),
|
||||
(Grolgar, _) => (-6.0, -2.0),
|
||||
(Saber, _) => (-4.0, -2.0),
|
||||
(Viper, _) => (-6.0, -1.0),
|
||||
(Tuskram, _) => (-6.0, -2.0),
|
||||
@ -163,7 +163,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tarasque, _) => (-7.0, -2.0),
|
||||
},
|
||||
torso_back: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (4.0, 11.0),
|
||||
(Grolgar, _) => (4.0, 11.0),
|
||||
(Saber, _) => (4.0, 9.0),
|
||||
(Viper, _) => (4.0, 7.0),
|
||||
(Tuskram, _) => (4.0, 9.0),
|
||||
@ -173,7 +173,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tarasque, _) => (4.0, 9.0),
|
||||
},
|
||||
torso_mid: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (-7.0, 10.5),
|
||||
(Grolgar, _) => (-7.0, 10.5),
|
||||
(Saber, _) => (-7.0, 9.5),
|
||||
(Viper, _) => (-7.0, 7.0),
|
||||
(Tuskram, _) => (-7.0, 9.0),
|
||||
@ -183,7 +183,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tarasque, _) => (-7.0, 8.0),
|
||||
},
|
||||
ears: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (-1.0, 5.0),
|
||||
(Grolgar, _) => (-1.0, 5.0),
|
||||
(Saber, _) => (-1.0, 6.0),
|
||||
(Viper, _) => (10.0, 2.0),
|
||||
(Tuskram, _) => (10.0, 2.0),
|
||||
@ -193,7 +193,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tarasque, _) => (1.5, -2.0),
|
||||
},
|
||||
feet_f: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (5.0, 6.0, 2.0),
|
||||
(Grolgar, _) => (5.0, 6.0, 2.0),
|
||||
(Saber, _) => (4.0, 6.0, 3.0),
|
||||
(Viper, _) => (4.0, 6.0, 3.0),
|
||||
(Tuskram, _) => (4.0, 6.0, 4.5),
|
||||
@ -203,7 +203,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tarasque, _) => (4.0, 6.0, 3.0),
|
||||
},
|
||||
feet_b: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (5.0, -4.0, 3.0),
|
||||
(Grolgar, _) => (5.0, -4.0, 3.0),
|
||||
(Saber, _) => (4.0, -6.0, 3.5),
|
||||
(Viper, _) => (4.0, -4.0, 3.5),
|
||||
(Tuskram, _) => (4.0, -8.0, 5.5),
|
||||
@ -213,7 +213,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tarasque, _) => (4.0, -8.0, 3.5),
|
||||
},
|
||||
height: match (body.species, body.body_type) {
|
||||
(Wolf, _) => (1.2),
|
||||
(Grolgar, _) => (1.2),
|
||||
(Saber, _) => (1.0),
|
||||
(Viper, _) => (0.7),
|
||||
(Tuskram, _) => (1.0),
|
||||
|
@ -1,5 +1,4 @@
|
||||
use super::{super::Animation, QuadrupedSmallSkeleton, SkeletonAttr};
|
||||
use std::f32::consts::PI;
|
||||
use vek::*;
|
||||
|
||||
pub struct JumpAnimation;
|
||||
@ -11,37 +10,50 @@ impl Animation for JumpAnimation {
|
||||
fn update_skeleton(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _global_time): Self::Dependency,
|
||||
anim_time: f64,
|
||||
_anim_time: f64,
|
||||
_rate: &mut f32,
|
||||
_skeleton_attr: &SkeletonAttr,
|
||||
skeleton_attr: &SkeletonAttr,
|
||||
) -> Self::Skeleton {
|
||||
let mut next = (*skeleton).clone();
|
||||
|
||||
let wave_slow = (anim_time as f32 * 7.0 + PI).sin();
|
||||
let wave_stop = (anim_time as f32 * 4.5).min(PI / 2.0).sin();
|
||||
|
||||
next.head.offset = Vec3::new(0.0, 0.0, -1.5) / 11.0;
|
||||
next.head.ori = Quaternion::rotation_x(wave_stop * 0.4);
|
||||
next.head.offset = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1) / 11.0;
|
||||
next.head.ori = Quaternion::rotation_z(-0.8) * Quaternion::rotation_x(0.5);
|
||||
next.head.scale = Vec3::one() / 10.5;
|
||||
|
||||
next.chest.offset = Vec3::new(0.0, -9.0, 1.5) / 11.0;
|
||||
next.chest.ori = Quaternion::rotation_x(0.0);
|
||||
next.chest.offset = Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1) / 11.0;
|
||||
next.chest.ori = Quaternion::rotation_y(0.0);
|
||||
next.chest.scale = Vec3::one() / 11.0;
|
||||
|
||||
next.leg_lf.offset = Vec3::new(-4.5, 3.0, 1.5) / 11.0;
|
||||
next.leg_lf.ori = Quaternion::rotation_x(wave_stop * 0.6 - wave_slow * 0.3);
|
||||
next.leg_lf.offset = Vec3::new(
|
||||
-skeleton_attr.feet_f.0,
|
||||
skeleton_attr.feet_f.1,
|
||||
skeleton_attr.feet_f.2,
|
||||
) / 11.0;
|
||||
next.leg_lf.ori = Quaternion::rotation_x(0.0);
|
||||
next.leg_lf.scale = Vec3::one() / 11.0;
|
||||
|
||||
next.leg_rf.offset = Vec3::new(2.5, 3.0, 1.5) / 11.0;
|
||||
next.leg_rf.ori = Quaternion::rotation_x(wave_stop * 0.6 - wave_slow * 0.3);
|
||||
next.leg_rf.offset = Vec3::new(
|
||||
skeleton_attr.feet_f.0,
|
||||
skeleton_attr.feet_f.1,
|
||||
skeleton_attr.feet_f.2,
|
||||
) / 11.0;
|
||||
next.leg_rf.ori = Quaternion::rotation_x(0.0);
|
||||
next.leg_rf.scale = Vec3::one() / 11.0;
|
||||
|
||||
next.leg_lb.offset = Vec3::new(-4.5, -4.0, 2.0) / 11.0;
|
||||
next.leg_lb.ori = Quaternion::rotation_x(wave_stop * -0.6 + wave_slow * 0.3);
|
||||
next.leg_lb.offset = Vec3::new(
|
||||
-skeleton_attr.feet_b.0,
|
||||
skeleton_attr.feet_b.1,
|
||||
skeleton_attr.feet_b.2,
|
||||
) / 11.0;
|
||||
next.leg_lb.ori = Quaternion::rotation_x(0.0);
|
||||
next.leg_lb.scale = Vec3::one() / 11.0;
|
||||
|
||||
next.leg_rb.offset = Vec3::new(2.5, -4.0, 2.0) / 11.0;
|
||||
next.leg_rb.ori = Quaternion::rotation_x(wave_stop * -0.6 + wave_slow * 0.3);
|
||||
next.leg_rb.offset = Vec3::new(
|
||||
skeleton_attr.feet_b.0,
|
||||
skeleton_attr.feet_b.1,
|
||||
skeleton_attr.feet_b.2,
|
||||
) / 11.0;
|
||||
next.leg_rb.ori = Quaternion::rotation_x(0.0);
|
||||
next.leg_rb.scale = Vec3::one() / 11.0;
|
||||
|
||||
next
|
||||
|
Loading…
Reference in New Issue
Block a user