3 attack anims done

This commit is contained in:
Snowram 2021-06-13 02:35:32 +02:00 committed by Sam
parent 879aafad5c
commit 15a2fbc555
5 changed files with 230 additions and 0 deletions

View File

@ -305,6 +305,7 @@ impl Body {
biped_large::Species::Occultsaurok => Vec3::new(4.0, 3.0, 3.4),
biped_large::Species::Slysaurok => Vec3::new(4.0, 3.0, 3.4),
biped_large::Species::Werewolf => Vec3::new(4.0, 3.0, 3.5),
biped_large::Species::Harvester => Vec3::new(4.6, 3.0, 5.4),
_ => Vec3::new(4.6, 3.0, 6.0),
},

View File

@ -327,6 +327,63 @@ impl Animation for AlphaAnimation {
* Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
* Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
},
"Harvester" => {
next.head.orientation =
Quaternion::rotation_x(move1 * -0.25 + move2 * 0.25)
* Quaternion::rotation_z(move1 * -0.3 + move2 * 0.4);
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1 + move2 * -0.5);
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.15);
next.upper_torso.orientation =
Quaternion::rotation_x(move1 * 0.2 + move2 * -0.2)
* Quaternion::rotation_z(move1 * -1.0 + move2 * 1.0);
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation =
Quaternion::rotation_x(-0.4 + move1 * 1.0 + move2 * -1.0)
* Quaternion::rotation_y(move1 * -0.2);
next.shoulder_r.orientation =
Quaternion::rotation_y(0.4 + move1 * -0.8 + move2 * 0.8)
* Quaternion::rotation_x(0.4 + move1 * -0.4 + move2 * 0.8);
if speed == 0.0 {
next.leg_l.orientation =
Quaternion::rotation_x(move1 * 0.4 + move2 * -0.4);
next.foot_l.position = Vec3::new(
-s_a.foot.0,
s_a.foot.1,
s_a.foot.2 + move1 * 2.0 + move2 * -2.0,
);
next.foot_l.orientation =
Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
}
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
next.control.position = Vec3::new(
-7.0 + move1 * 26.0 - move2 * 32.0,
0.0 + s_a.grip.0 / 1.0 - move1 * 4.0,
-s_a.grip.0 / 0.8,
);
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0)
* Quaternion::rotation_y(-0.0)
* Quaternion::rotation_z(PI);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
* Quaternion::rotation_y(-1.0 + move1 * 1.0)
* Quaternion::rotation_z(0.0);
next.control.orientation = Quaternion::rotation_x(-1.4 + move1 * -0.4)
* Quaternion::rotation_y(-2.8 + move1 * 3.0 + move2 * -3.0)
* Quaternion::rotation_z(move1 * -1.5);
},
_ => {},
}
}

View File

@ -215,6 +215,69 @@ impl Animation for BeamAnimation {
move1 * -0.8 + move2 * 1.1 + move2shake * 0.02,
);
},
"Harvester" => {
next.head.orientation = Quaternion::rotation_x(
move1 * 0.5 + move2 * -0.4 + move2shake * -0.02,
);
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
next.jaw.orientation =
Quaternion::rotation_x(move2 * -0.5 + move2shake * -0.1);
next.upper_torso.position = Vec3::new(
0.0,
s_a.upper_torso.0 + move1 * -3.0 + move2 * 3.0,
s_a.upper_torso.1 + move1 * -0.4,
);
next.upper_torso.orientation = Quaternion::rotation_x(
move1 * 0.8 + move2 * -1.1 + move2shake * -0.02,
);
next.lower_torso.position =
Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1);
next.lower_torso.orientation = Quaternion::rotation_x(
move1 * -0.8 + move2 * 1.1 + move2shake * 0.02,
);
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
next.control.position =
Vec3::new(-6.0, 0.0 + s_a.grip.0 / 1.0, -s_a.grip.0 / 0.8);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
* Quaternion::rotation_y(-1.0);
next.control.orientation =
Quaternion::rotation_x(-1.4) * Quaternion::rotation_y(-2.8);
next.weapon_l.position =
Vec3::new(move1 * 8.0, move1 * 1.0, move1 * 6.0);
next.weapon_l.orientation = Quaternion::rotation_x(move1 * 0.5)
* Quaternion::rotation_y(move1 * -0.8);
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation =
Quaternion::rotation_y(-0.4 + move1 * 0.8)
* Quaternion::rotation_x(-0.4 + move1 * -0.2);
next.shoulder_r.orientation =
Quaternion::rotation_y(0.4 + move1 * -0.8)
* Quaternion::rotation_x(0.4 + move1 * -0.8);
next.hand_r.position = Vec3::new(
-s_a.grip.1 + move1 * -5.0,
0.0 + move1 * 6.0,
s_a.grip.0 + move1 * 13.0,
);
next.hand_r.orientation = Quaternion::rotation_x(move1 * -3.0)
* Quaternion::rotation_y(move1 * 1.5)
* Quaternion::rotation_z(move1 * -1.5);
},
_ => {},
}
}

View File

@ -262,6 +262,87 @@ impl Animation for ShootAnimation {
next.arm_control_r.position =
Vec3::new(0.0, move1 * 10.0 + move2 * -10.0, 0.0);
},
"Harvester" => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Swing) => (1.0, anim_time, 0.0),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0),
};
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
next.control.position =
Vec3::new(-7.0, 0.0 + s_a.grip.0 / 1.0, -s_a.grip.0 / 0.8);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
* Quaternion::rotation_y(-1.0)
* Quaternion::rotation_z(0.0);
next.control.orientation =
Quaternion::rotation_x(-1.4) * Quaternion::rotation_y(-2.8);
next.head.orientation = Quaternion::rotation_x(move1 * 0.2);
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
let twist = move1 * 0.8 + move3 * -0.8;
next.upper_torso.position = Vec3::new(
0.0,
s_a.upper_torso.0,
s_a.upper_torso.1 + move1 * 1.0 + move2 * -1.0,
);
next.upper_torso.orientation =
Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1)
* Quaternion::rotation_z(
twist * -0.2 + move1 * -0.1 + move2 * 0.3,
);
next.lower_torso.orientation =
Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1)
* Quaternion::rotation_z(-twist + move1 * 0.4);
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation = Quaternion::rotation_x(-0.4);
next.shoulder_r.position = Vec3::new(
s_a.shoulder.0 + move2 * -2.0,
s_a.shoulder.1,
s_a.shoulder.2,
);
next.shoulder_r.orientation = Quaternion::rotation_y(move1 * -PI / 2.0)
* Quaternion::rotation_x(move2 * 2.0)
* Quaternion::rotation_z(move1 * -PI / 2.0);
next.hand_r.position = Vec3::new(
-s_a.grip.1 + move1 * -2.0 + move2 * 8.0,
0.0 + move1 * 6.0,
s_a.grip.0 + move1 * 18.0 + move2 * -19.0,
);
next.hand_r.orientation =
Quaternion::rotation_x(move1 * -3.0 + move2 * 3.0)
* Quaternion::rotation_y(move1 * 0.5 + move2 * -1.5)
* Quaternion::rotation_z(move1 * -1.5);
if speed == 0.0 {
next.leg_l.orientation =
Quaternion::rotation_x(move1 * 0.8 + move2 * -0.8);
next.foot_l.position = Vec3::new(
-s_a.foot.0,
s_a.foot.1,
s_a.foot.2 + move1 * 4.0 + move2 * -4.0,
);
next.foot_l.orientation =
Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
}
},
_ => {},
}
}

View File

@ -470,6 +470,34 @@ impl Animation for WieldAnimation {
next.shoulder_r.orientation = Quaternion::rotation_x(-0.3);
},
"Harvester" => {
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
next.control.position = Vec3::new(
-7.0,
0.0 + s_a.grip.0 / 1.0,
-s_a.grip.0 / 0.8 + short * -1.5,
);
next.control_l.orientation =
Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
* Quaternion::rotation_y(-1.0)
* Quaternion::rotation_z(0.0);
next.control.orientation =
Quaternion::rotation_x(-1.4) * Quaternion::rotation_y(-2.8);
next.shoulder_l.position = Vec3::new(
-s_a.shoulder.0,
s_a.shoulder.1,
s_a.shoulder.2 - foothorir * 1.0,
);
next.shoulder_l.orientation = Quaternion::rotation_x(-0.4);
next.shoulder_r.orientation =
Quaternion::rotation_y(0.4) * Quaternion::rotation_x(0.4);
},
_ => {},
}
}