Split wyvern anims from the other birdlarge anims

This commit is contained in:
Snowram 2021-04-30 12:43:44 +02:00
parent e8bce3ad9f
commit 6eb2ade783
11 changed files with 257 additions and 163 deletions

View File

@ -51,12 +51,12 @@ impl Animation for AlphaAnimation {
0.0
} * 1.3;
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + wave_slow_cos * 0.06);
next.chest.orientation = Quaternion::rotation_x(move1 * 0.5 - move2 * 0.8);

View File

@ -51,12 +51,12 @@ impl Animation for BreatheAnimation {
let wave_slow_cos = (anim_time * 4.5).cos();
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.chest.position = Vec3::new(
0.0,

View File

@ -39,12 +39,12 @@ impl Animation for FeedAnimation {
let wave_fast = (anim_time * 9.0).cos();
let beak = (anim_time * 16.0).sin();
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + wave_slow_cos * 0.06 - 1.8);
next.chest.orientation = Quaternion::rotation_x(s_a.feed);

View File

@ -26,7 +26,7 @@ impl Animation for FlyAnimation {
let fast = (anim_time * 4.0).sin();
// Harmonic series hack to get a sine/saw mix
let freq = 8.0;
let freq = if s_a.wyvern { 6.0 } else { 8.0 };
let off1 = 0.0;
let off2 = -1.7;
let off3 = -2.0;
@ -58,12 +58,12 @@ impl Animation for FlyAnimation {
0.0
} * 1.3;
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.neck.position = Vec3::new(0.0, s_a.neck.0, s_a.neck.1);
next.neck.orientation =
@ -98,15 +98,21 @@ impl Animation for FlyAnimation {
next.wing_out_l.position = Vec3::new(-s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_r.position = Vec3::new(s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_l.orientation = Quaternion::rotation_y(-flap3 * 0.6 - 0.3);
next.wing_out_r.orientation = Quaternion::rotation_y(flap3 * 0.6 + 0.3);
if s_a.wyvern {
next.wing_out_l.orientation = Quaternion::rotation_y(-flap3 * 0.6 - 0.3);
next.wing_out_r.orientation = Quaternion::rotation_y(flap3 * 0.6 + 0.3);
} else {
next.wing_out_l.orientation = Quaternion::rotation_y(-flap3 * 1.2 - 0.3);
next.wing_out_r.orientation = Quaternion::rotation_y(flap3 * 1.2 + 0.3);
}
next.tail_front.position = Vec3::new(0.0, s_a.tail_front.0, s_a.tail_front.1);
next.tail_front.orientation =
Quaternion::rotation_x(-flap2 * 0.2 + 0.1) * Quaternion::rotation_z(-tilt * 1.0);
Quaternion::rotation_x(-flap2 * 0.2 + 0.1) * Quaternion::rotation_z(tilt * 1.0);
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
next.tail_rear.orientation =
Quaternion::rotation_x(-flap3 * 0.3 + 0.15) * Quaternion::rotation_z(-tilt * 0.8);
Quaternion::rotation_x(-flap3 * 0.3 + 0.15) * Quaternion::rotation_z(tilt * 0.8);
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 - flap4 * 1.5);
next.leg_l.orientation = Quaternion::rotation_x(
@ -151,10 +157,10 @@ impl Animation for FlyAnimation {
next.tail_front.position = Vec3::new(0.0, s_a.tail_front.0, s_a.tail_front.1);
next.tail_front.orientation =
Quaternion::rotation_x(0.04 - slow * 0.04) * Quaternion::rotation_z(-tilt * 1.0);
Quaternion::rotation_x(0.04 - slow * 0.04) * Quaternion::rotation_z(tilt * 1.0);
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
next.tail_rear.orientation =
Quaternion::rotation_x(slow * 0.08) * Quaternion::rotation_z(-tilt * 0.8);
Quaternion::rotation_x(slow * 0.08) * Quaternion::rotation_z(tilt * 0.8);
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + slow * 0.05);
next.leg_l.orientation = Quaternion::rotation_x(-1.2 + slow * -0.05)

View File

@ -37,12 +37,12 @@ impl Animation for IdleAnimation {
);
let wave_slow_cos = (anim_time * 4.5).cos();
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + wave_slow_cos * 0.06 + 1.5);
next.chest.orientation = Quaternion::rotation_x(0.0);
@ -50,44 +50,9 @@ impl Animation for IdleAnimation {
next.neck.position = Vec3::new(0.0, s_a.neck.0, s_a.neck.1);
next.neck.orientation = Quaternion::rotation_x(0.0);
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
next.head.orientation = Quaternion::rotation_z(duck_head_look.x)
* Quaternion::rotation_x(0.4 - duck_head_look.y.abs() + wave_slow_cos * 0.01);
next.beak.position = Vec3::new(0.0, s_a.beak.0, s_a.beak.1);
next.beak.orientation = Quaternion::rotation_x(wave_slow_cos * -0.02 - 0.02);
next.tail_front.position = Vec3::new(0.0, s_a.tail_front.0, s_a.tail_front.1);
next.tail_front.orientation = Quaternion::rotation_x(0.3);
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
next.tail_rear.orientation = Quaternion::rotation_x(-0.0);
next.wing_in_l.position = Vec3::new(-s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
next.wing_in_r.position = Vec3::new(s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
next.wing_in_l.orientation =
Quaternion::rotation_y(-0.8 + wave_slow_cos * 0.06) * Quaternion::rotation_z(0.4);
next.wing_in_r.orientation =
Quaternion::rotation_y(0.8 - wave_slow_cos * 0.06) * Quaternion::rotation_z(-0.4);
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_l.orientation = Quaternion::rotation_x(0.1)
* Quaternion::rotation_y(-0.1)
* Quaternion::rotation_z(0.7);
next.wing_mid_r.orientation = Quaternion::rotation_x(0.1)
* Quaternion::rotation_y(0.1)
* Quaternion::rotation_z(-0.7);
next.wing_out_l.position = Vec3::new(-s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_r.position = Vec3::new(s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_l.orientation = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(0.1)
* Quaternion::rotation_z(0.55);
next.wing_out_r.orientation = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-0.1)
* Quaternion::rotation_z(-0.55);
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2);
next.leg_l.orientation = Quaternion::rotation_x(0.0);
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2);
@ -98,6 +63,81 @@ impl Animation for IdleAnimation {
next.foot_r.position = Vec3::new(s_a.foot.0, s_a.foot.1, s_a.foot.2);
next.foot_r.orientation = Quaternion::rotation_x(0.0);
if s_a.wyvern {
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + wave_slow_cos * 0.06);
next.chest.orientation = Quaternion::rotation_x(-0.1);
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
next.head.orientation = Quaternion::rotation_z(duck_head_look.x)
* Quaternion::rotation_x(0.4 - duck_head_look.y.abs() + wave_slow_cos * 0.01);
next.tail_front.position = Vec3::new(0.0, s_a.tail_front.0, s_a.tail_front.1);
next.tail_front.orientation = Quaternion::rotation_x(0.38);
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
next.tail_rear.orientation = Quaternion::rotation_x(-0.1);
next.wing_in_l.position = Vec3::new(-s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
next.wing_in_r.position = Vec3::new(s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
next.wing_in_l.orientation =
Quaternion::rotation_y(-0.8 + wave_slow_cos * 0.06) * Quaternion::rotation_z(0.4);
next.wing_in_r.orientation =
Quaternion::rotation_y(0.8 - wave_slow_cos * 0.06) * Quaternion::rotation_z(-0.4);
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_l.orientation = Quaternion::rotation_x(0.1)
* Quaternion::rotation_y(-0.1)
* Quaternion::rotation_z(0.7);
next.wing_mid_r.orientation = Quaternion::rotation_x(0.1)
* Quaternion::rotation_y(0.1)
* Quaternion::rotation_z(-0.7);
next.wing_out_l.position = Vec3::new(-s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_r.position = Vec3::new(s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_l.orientation = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(0.1)
* Quaternion::rotation_z(0.55);
next.wing_out_r.orientation = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-0.1)
* Quaternion::rotation_z(-0.55);
} else {
next.chest.position =
Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + wave_slow_cos * 0.06 + 1.5);
next.chest.orientation = Quaternion::rotation_x(0.0);
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
next.head.orientation = Quaternion::rotation_z(duck_head_look.x)
* Quaternion::rotation_x(-duck_head_look.y.abs() + wave_slow_cos * 0.01);
next.tail_front.position = Vec3::new(0.0, s_a.tail_front.0, s_a.tail_front.1);
next.tail_front.orientation = Quaternion::rotation_x(0.6);
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
next.tail_rear.orientation = Quaternion::rotation_x(-0.2);
next.wing_in_l.position = Vec3::new(-s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
next.wing_in_r.position = Vec3::new(s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
next.wing_in_l.orientation =
Quaternion::rotation_y(-0.8 + wave_slow_cos * 0.06) * Quaternion::rotation_z(0.2);
next.wing_in_r.orientation =
Quaternion::rotation_y(0.8 - wave_slow_cos * 0.06) * Quaternion::rotation_z(-0.2);
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_l.orientation =
Quaternion::rotation_y(-0.1) * Quaternion::rotation_z(0.7);
next.wing_mid_r.orientation =
Quaternion::rotation_y(0.1) * Quaternion::rotation_z(-0.7);
next.wing_out_l.position = Vec3::new(-s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_r.position = Vec3::new(s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_l.orientation =
Quaternion::rotation_y(-0.4) * Quaternion::rotation_z(0.2);
next.wing_out_r.orientation =
Quaternion::rotation_y(0.4) * Quaternion::rotation_z(-0.2);
}
next
}
}

View File

@ -124,6 +124,7 @@ pub struct SkeletonAttr {
foot: (f32, f32, f32),
scaler: f32,
feed: f32,
wyvern: bool,
}
impl<'a> std::convert::TryFrom<&'a comp::Body> for SkeletonAttr {
@ -153,6 +154,7 @@ impl Default for SkeletonAttr {
foot: (0.0, 0.0, 0.0),
scaler: 0.0,
feed: 0.0,
wyvern: false,
}
}
}
@ -239,6 +241,10 @@ impl<'a> From<&'a Body> for SkeletonAttr {
(Roc, _) => (-0.4),
(FlameWyvern, _) => (-0.65),
},
wyvern: match (body.species, body.body_type) {
(FlameWyvern, _) => true,
_ => false,
},
}
}
}

View File

@ -65,12 +65,12 @@ impl Animation for RunAnimation {
0.0
} * 1.3;
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
next.head.orientation = Quaternion::rotation_x(-0.1 * speednorm + short * -0.05)
@ -85,67 +85,6 @@ impl Animation for RunAnimation {
* Quaternion::rotation_y(tilt * 0.1)
* Quaternion::rotation_z(shortalt * -0.1 - tilt * 0.5);
next.chest.position = Vec3::new(
0.0,
s_a.chest.0,
s_a.chest.1 + short * 0.5 + 0.5 * speednorm,
);
next.chest.orientation = Quaternion::rotation_x(short * 0.07)
* Quaternion::rotation_y(tilt * 0.8)
* Quaternion::rotation_z(shortalt * 0.10);
next.tail_front.position = Vec3::new(0.0, s_a.tail_front.0, s_a.tail_front.1);
next.tail_front.orientation = Quaternion::rotation_x(0.3 + short * -0.02);
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
next.tail_rear.orientation = Quaternion::rotation_x(-0.2 + short * -0.1);
next.wing_in_l.position = Vec3::new(
-s_a.wing_in.0,
s_a.wing_in.1 + foot1a * 2.0,
s_a.wing_in.2 + speednorm * 1.0 + foot1b * 1.0,
);
next.wing_in_r.position = Vec3::new(
s_a.wing_in.0,
s_a.wing_in.1 + foot2a * 2.0,
s_a.wing_in.2 + speednorm * 1.0 + foot2b * 1.0,
);
next.wing_in_l.orientation = Quaternion::rotation_x(foot2a * -0.05 + speednorm * -0.3)
* Quaternion::rotation_y(-0.8 + speednorm * 0.55 + foot2b * -0.2)
* Quaternion::rotation_z(0.2 + foot2a * 0.6);
next.wing_in_r.orientation = Quaternion::rotation_x(foot1a * -0.05 + speednorm * -0.3)
* Quaternion::rotation_y(0.8 + speednorm * -0.55 + foot1b * 0.2)
* Quaternion::rotation_z(-0.2 + foot1a * -0.6);
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_l.orientation = Quaternion::rotation_y(-0.1) * Quaternion::rotation_z(0.7);
next.wing_mid_r.orientation = Quaternion::rotation_y(0.1) * Quaternion::rotation_z(-0.7);
next.wing_out_l.position = Vec3::new(-s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_r.position = Vec3::new(s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_l.orientation = Quaternion::rotation_y(-0.2 + short * 0.05)
* Quaternion::rotation_z(0.2 + foot2a * 0.3);
next.wing_out_r.orientation = Quaternion::rotation_y(0.2 + short * -0.05)
* Quaternion::rotation_z(-0.2 + foot1a * 0.3);
next.leg_l.position = Vec3::new(
-s_a.leg.0 + speednorm * 1.5,
s_a.leg.1 + foot1b * -2.3,
s_a.leg.2,
);
next.leg_l.orientation = Quaternion::rotation_x(-0.2 * speednorm + foot1a * 0.15)
* Quaternion::rotation_y(tilt * 0.5);
next.leg_r.position = Vec3::new(
s_a.leg.0 + speednorm * -1.5,
s_a.leg.1 + foot2b * -2.3,
s_a.leg.2,
);
next.leg_r.orientation = Quaternion::rotation_x(-0.2 * speednorm + foot2a * 0.15)
* Quaternion::rotation_y(tilt * 0.5);
next.foot_l.position = Vec3::new(
-s_a.foot.0,
s_a.foot.1 + foot1b * -1.0,
@ -164,6 +103,109 @@ impl Animation for RunAnimation {
* Quaternion::rotation_y(tilt * -1.0)
* Quaternion::rotation_z(tilt * -0.5);
if s_a.wyvern {
next.chest.position = Vec3::new(
0.0,
s_a.chest.0,
s_a.chest.1 + short * 0.5 + speednorm * -2.0,
);
next.chest.orientation = Quaternion::rotation_x(-0.1 + short * 0.07)
* Quaternion::rotation_y(tilt * 0.8)
* Quaternion::rotation_z(shortalt * 0.10);
next.tail_front.position = Vec3::new(0.0, s_a.tail_front.0, s_a.tail_front.1);
next.tail_front.orientation =
Quaternion::rotation_x(0.3 + short * -0.02) * Quaternion::rotation_z(tilt * 2.0);
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
next.tail_rear.orientation =
Quaternion::rotation_x(-0.1 + short * -0.1) * Quaternion::rotation_z(tilt * 0.8);
next.wing_in_l.position = Vec3::new(
-s_a.wing_in.0,
s_a.wing_in.1 + foot1a * 2.0,
s_a.wing_in.2 + speednorm * 1.0 + foot1b * 1.0,
);
next.wing_in_r.position = Vec3::new(
s_a.wing_in.0,
s_a.wing_in.1 + foot2a * 2.0,
s_a.wing_in.2 + speednorm * 1.0 + foot2b * 1.0,
);
next.wing_in_l.orientation = Quaternion::rotation_x(foot2a * -0.05 + speednorm * -0.3)
* Quaternion::rotation_y(-0.8 + speednorm * 0.55 + foot2b * -0.2)
* Quaternion::rotation_z(0.2 + foot2a * 0.6);
next.wing_in_r.orientation = Quaternion::rotation_x(foot1a * -0.05 + speednorm * -0.3)
* Quaternion::rotation_y(0.8 + speednorm * -0.55 + foot1b * 0.2)
* Quaternion::rotation_z(-0.2 + foot1a * -0.6);
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_l.orientation = Quaternion::rotation_x(0.1)
* Quaternion::rotation_y(-0.1)
* Quaternion::rotation_z(0.7);
next.wing_mid_r.orientation = Quaternion::rotation_x(0.1)
* Quaternion::rotation_y(0.1)
* Quaternion::rotation_z(-0.7);
next.wing_out_l.position = Vec3::new(-s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_r.position = Vec3::new(s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_l.orientation = Quaternion::rotation_y(0.2 + short * 0.05)
* Quaternion::rotation_z(0.3 + foot2a * 0.3);
next.wing_out_r.orientation = Quaternion::rotation_y(-0.2 + short * -0.05)
* Quaternion::rotation_z(-0.3 + foot1a * 0.3);
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1 + foot1b * -2.3, s_a.leg.2);
next.leg_l.orientation = Quaternion::rotation_x(-1.0 * speednorm + foot1a * 0.15)
* Quaternion::rotation_y(tilt * 0.5);
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1 + foot2b * -2.3, s_a.leg.2);
next.leg_r.orientation = Quaternion::rotation_x(-1.0 * speednorm + foot2a * 0.15)
* Quaternion::rotation_y(tilt * 0.5);
} else {
next.chest.position = Vec3::new(
0.0,
s_a.chest.0,
s_a.chest.1 + short * 0.5 + 0.5 * speednorm,
);
next.chest.orientation = Quaternion::rotation_x(short * 0.07)
* Quaternion::rotation_y(tilt * 0.8)
* Quaternion::rotation_z(shortalt * 0.10);
next.tail_front.position = Vec3::new(0.0, s_a.tail_front.0, s_a.tail_front.1);
next.tail_front.orientation = Quaternion::rotation_x(0.6 + short * -0.02);
next.tail_rear.position = Vec3::new(0.0, s_a.tail_rear.0, s_a.tail_rear.1);
next.tail_rear.orientation = Quaternion::rotation_x(-0.2 + short * -0.1);
next.wing_in_l.position = Vec3::new(-s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
next.wing_in_r.position = Vec3::new(s_a.wing_in.0, s_a.wing_in.1, s_a.wing_in.2);
next.wing_in_l.orientation = Quaternion::rotation_y(-0.8) * Quaternion::rotation_z(0.2);
next.wing_in_r.orientation = Quaternion::rotation_y(0.8) * Quaternion::rotation_z(-0.2);
next.wing_mid_l.position = Vec3::new(-s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_r.position = Vec3::new(s_a.wing_mid.0, s_a.wing_mid.1, s_a.wing_mid.2);
next.wing_mid_l.orientation =
Quaternion::rotation_y(-0.1) * Quaternion::rotation_z(0.7);
next.wing_mid_r.orientation =
Quaternion::rotation_y(0.1) * Quaternion::rotation_z(-0.7);
next.wing_out_l.position = Vec3::new(-s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_r.position = Vec3::new(s_a.wing_out.0, s_a.wing_out.1, s_a.wing_out.2);
next.wing_out_l.orientation =
Quaternion::rotation_y(-0.2 + short * 0.05) * Quaternion::rotation_z(0.2);
next.wing_out_r.orientation =
Quaternion::rotation_y(0.2 + short * -0.05) * Quaternion::rotation_z(-0.2);
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1 + foot1b * -2.3, s_a.leg.2);
next.leg_l.orientation = Quaternion::rotation_x(-0.2 * speednorm + foot1a * 0.15)
* Quaternion::rotation_y(tilt * 0.5);
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1 + foot2b * -2.3, s_a.leg.2);
next.leg_r.orientation = Quaternion::rotation_x(-0.2 * speednorm + foot2a * 0.15)
* Quaternion::rotation_y(tilt * 0.5);
}
next
}
}

View File

@ -38,12 +38,12 @@ impl Animation for ShockwaveAnimation {
let wave_slow_cos = (anim_time * 4.5).cos();
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + movement1abs * 1.5);
next.chest.orientation = Quaternion::rotation_x(movement1abs * 1.0 + movement2abs * -1.0);

View File

@ -43,12 +43,12 @@ impl Animation for ShootAnimation {
let wave_slow_cos = (anim_time * 4.5).cos();
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.chest.position = Vec3::new(
0.0,

View File

@ -37,12 +37,12 @@ impl Animation for StunnedAnimation {
let twitch2 = mirror * (twitch * 20.0).sin() * pullback;
let movement1abs = movement1base * pullback;
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + wave_slow_cos * 0.06);
next.chest.orientation = Quaternion::rotation_x(movement1base * 0.5);

View File

@ -41,12 +41,12 @@ impl Animation for SwimAnimation {
let wave_fast = (anim_time * 6.0).sin();
let wave_fast_cos = (anim_time * 6.0).cos();
next.head.scale = Vec3::one() * 0.98;
next.neck.scale = Vec3::one() * 1.02;
next.leg_l.scale = Vec3::one() * 0.98;
next.leg_r.scale = Vec3::one() * 0.98;
next.foot_l.scale = Vec3::one() * 1.02;
next.foot_r.scale = Vec3::one() * 1.02;
next.head.scale = Vec3::one() * 0.99;
next.neck.scale = Vec3::one() * 1.01;
next.foot_l.scale = Vec3::one() * 1.01;
next.foot_r.scale = Vec3::one() * 1.01;
next.tail_front.scale = Vec3::one() * 1.01;
next.tail_rear.scale = Vec3::one() * 0.99;
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1 + wave_slow_cos * 0.06 + 1.5);
next.chest.orientation = Quaternion::rotation_x(0.0);