Fix dragon jaw Z fighting

This commit is contained in:
Snowram 2020-05-10 01:40:53 +02:00
parent 41ff0bde69
commit 4ba222abcd
4 changed files with 11 additions and 11 deletions

View File

@ -39,7 +39,7 @@ impl Animation for FlyAnimation {
);
next.head_upper.ori =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(wave_ultra_slow * -0.10);
next.head_upper.scale = Vec3::one();
next.head_upper.scale = Vec3::one() * 1.05;
next.head_lower.offset = Vec3::new(
0.0,
@ -48,15 +48,15 @@ impl Animation for FlyAnimation {
);
next.head_lower.ori =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(wave_ultra_slow * -0.10);
next.head_lower.scale = Vec3::one();
next.head_lower.scale = Vec3::one() * 1.05;
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,
);
next.jaw.ori = Quaternion::rotation_x(wave_slow * 0.05);
next.jaw.scale = Vec3::one() * 0.98;
next.jaw.ori = Quaternion::rotation_x(wave_slow * 0.03);
next.jaw.scale = Vec3::one() * 1.05;
next.tail_front.offset = Vec3::new(
0.0,
@ -141,7 +141,7 @@ impl Animation for FlyAnimation {
skeleton_attr.wing_out.2,
);
next.wing_out_l.ori = Quaternion::rotation_y((0.35 + wingl * 0.6).max(0.2));
next.wing_out_l.scale = Vec3::one() * 1.05;
next.wing_out_l.scale = Vec3::one();
next.wing_out_r.offset = Vec3::new(
skeleton_attr.wing_out.0,

View File

@ -53,8 +53,8 @@ impl Animation for IdleAnimation {
next.head_lower.scale = Vec3::one() * 1.05;
next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
next.jaw.ori = Quaternion::rotation_x(slow * 0.05);
next.jaw.scale = Vec3::one() * 0.98;
next.jaw.ori = Quaternion::rotation_x(slow * 0.04);
next.jaw.scale = Vec3::one() * 1.05;
next.chest_front.offset = Vec3::new(
0.0,

View File

@ -158,7 +158,7 @@ impl<'a> From<&'a comp::dragon::Body> for SkeletonAttr {
(Reddragon, _) => (7.5, 3.5),
},
jaw: match (body.species, body.body_type) {
(Reddragon, _) => (7.0, -5.0),
(Reddragon, _) => (6.5, -5.0),
},
chest_front: match (body.species, body.body_type) {
(Reddragon, _) => (0.0, 14.0),

View File

@ -67,8 +67,8 @@ impl Animation for RunAnimation {
skeleton_attr.jaw.0 - wave_ultra_slow_cos * 0.12,
skeleton_attr.jaw.1 + wave_slow * 0.2,
);
next.jaw.ori = Quaternion::rotation_x(wave_slow * 0.05);
next.jaw.scale = Vec3::one() * 0.98;
next.jaw.ori = Quaternion::rotation_x(wave_slow * 0.03);
next.jaw.scale = Vec3::one() * 1.05;
next.tail_front.offset = Vec3::new(
0.0,
@ -137,7 +137,7 @@ impl Animation for RunAnimation {
skeleton_attr.wing_in.2,
);
next.wing_in_l.ori = Quaternion::rotation_y(0.8);
next.wing_in_l.scale = Vec3::one() * 1.05;
next.wing_in_l.scale = Vec3::one();
next.wing_in_r.offset = Vec3::new(
skeleton_attr.wing_in.0,