Former-commit-id: 1ef4423a8f839f5c72c650dd0ba4affddc0215fa
This commit is contained in:
jshipsey 2019-04-20 18:37:09 -04:00
parent 9d2040d509
commit a7f300feee
2 changed files with 16 additions and 34 deletions

View File

@ -20,10 +20,10 @@ const SCALE: f32 = 11.0;
pub struct CharacterSkeleton {
head: Bone,
chest: Bone,
belt: Bone,
shorts: Bone,
l_hand: Bone,
bl_foot: Bone,
br_foot: Bone,
r_hand: Bone,
l_hand: Bone,
l_foot: Bone,
r_foot: Bone,
back: Bone,
@ -34,10 +34,10 @@ impl CharacterSkeleton {
Self {
head: Bone::default(),
chest: Bone::default(),
belt: Bone::default(),
shorts: Bone::default(),
l_hand: Bone::default(),
br_foot: Bone::default(),
bl_foot: Bone::default(),
r_hand: Bone::default(),
l_hand: Bone::default(),
l_foot: Bone::default(),
r_foot: Bone::default(),
back: Bone::default(),
@ -52,10 +52,10 @@ impl Skeleton for CharacterSkeleton {
[
FigureBoneData::new(self.head.compute_base_matrix()),
FigureBoneData::new(chest_mat),
FigureBoneData::new(self.belt.compute_base_matrix()),
FigureBoneData::new(self.shorts.compute_base_matrix()),
FigureBoneData::new(self.l_hand.compute_base_matrix()),
FigureBoneData::new(self.bl_foot.compute_base_matrix()),
FigureBoneData::new(self.br_foot.compute_base_matrix()),
FigureBoneData::new(self.r_hand.compute_base_matrix()),
FigureBoneData::new(self.l_hand.compute_base_matrix()),
FigureBoneData::new(self.l_foot.compute_base_matrix()),
FigureBoneData::new(self.r_foot.compute_base_matrix()),
FigureBoneData::new(chest_mat * self.back.compute_base_matrix()),

View File

@ -30,44 +30,26 @@ impl Animation for RunAnimation {
let wavecos_slow = (time as f32 * 8.0 + PI).cos();
let wave_dip = (wave_slow.abs() - 0.5).abs();
<<<<<<< HEAD
next.head.offset = Vec3::unit_z() * (12.0 + fuzzwave *0.4)/ SCALE;
next.head.offset = Vec3::unit_z() * (12.0 + fuzzwave *1.0)/ SCALE;
next.chest.offset = Vec3::unit_z() * (8.0 + fuzzwave * 0.3) / SCALE;
next.chest.ori = Quaternion::rotation_z(wave * 0.2);
next.belt.offset = Vec3::unit_z() * (6.0 + fuzzwave * 0.3)/ SCALE;
next.belt.ori = Quaternion::rotation_z(wave * 0.2);
next.shorts.offset = Vec3::unit_z() * (3.0 + fuzzwave * 0.3) / SCALE;
next.shorts.ori = Quaternion::rotation_z(wave * 0.1);
=======
next.head.offset = Vec3::unit_z() * (12.0 + fuzzwave *1.0)/ 11.0;
next.chest.offset = Vec3::unit_z() * (8.0 + fuzzwave * 0.8) / 11.0;
next.chest.offset = Vec3::unit_z() * (8.0 + fuzzwave * 0.8) / SCALE;
next.chest.ori = Quaternion::rotation_z(wave * 0.3);
next.belt.offset = Vec3::unit_z() * (6.0 + fuzzwave * 0.8)/ 11.0;
next.belt.offset = Vec3::unit_z() * (6.0 + fuzzwave * 0.8) / SCALE;
next.belt.ori = Quaternion::rotation_z(wave * 0.3);
next.shorts.offset = Vec3::unit_z() * (3.0 + fuzzwave * 0.8) / 11.0;
next.shorts.offset = Vec3::unit_z() * (3.0 + fuzzwave * 0.8) / SCALE;
next.shorts.ori = Quaternion::rotation_z(wave * 0.2);
>>>>>>> animation minor fixes
next.l_hand.offset = Vec3::new(0.0 - wavecos * 1.0, 7.5, 11.0 - wave * 1.0) / SCALE;
next.l_hand.ori = Quaternion::rotation_y(wave * -1.8);
next.r_hand.offset = Vec3::new(0.0 + wavecos * 1.0, -7.5, 11.0 + wave * 1.0) / SCALE;
next.r_hand.ori = Quaternion::rotation_y(wave * 1.8);
<<<<<<< HEAD
next.l_foot.offset = Vec3::new(2.5 - wavecos * 4.0, 3.4, 6.0 + wave * 2.5) / SCALE;
next.l_foot.offset = Vec3::new(2.5 - wavecos * 4.0, 3.4, 6.0 + wave * 2.9) / SCALE;
next.l_foot.ori = Quaternion::rotation_y(wave * -1.0);
next.r_foot.offset = Vec3::new(2.5 + wavecos * 4.0, -3.4, 6.0 - wave * 2.5) / SCALE;
=======
next.l_foot.offset = Vec3::new(2.5 - wavecos * 4.0, 3.4, 6.0 + wave * 2.9) / 11.0;
next.l_foot.ori = Quaternion::rotation_y(wave * -1.0);
next.r_foot.offset = Vec3::new(2.5 + wavecos * 4.0, -3.4, 6.0 - wave * 2.9) / 11.0;
>>>>>>> animation minor fixes
next.r_foot.offset = Vec3::new(2.5 + wavecos * 4.0, -3.4, 6.0 - wave * 2.9) / SCALE;
next.r_foot.ori = Quaternion::rotation_y(wave * 1.0);
next.back.offset = Vec3::new(-6.0, 16.0, 15.0);