mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Standardizes character bone names
This commit is contained in:
parent
58e2d3a4ad
commit
290adcfad8
@ -174,12 +174,12 @@ impl Animation for AlphaAnimation {
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
// next.r_control.position = Vec3::new(-10.0 + push * 5.0, 6.0 + push * 5.0,
|
||||
// 2.0); next.r_control.orientation =
|
||||
// next.control_r.position = Vec3::new(-10.0 + push * 5.0, 6.0 + push * 5.0,
|
||||
// 2.0); next.control_r.orientation =
|
||||
// Quaternion::rotation_x(-1.4 + slow * 0.4)
|
||||
// * Quaternion::rotation_y(slow * -1.3)
|
||||
// * Quaternion::rotation_z(1.4 + slow * -0.5);
|
||||
// next.r_control.scale = Vec3::one();
|
||||
// next.control_r.scale = Vec3::one();
|
||||
|
||||
// next.hand_r.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
// next.hand_r.orientation = Quaternion::rotation_x(1.27);
|
||||
|
@ -83,7 +83,7 @@ impl Skeleton for BipedLargeSkeleton {
|
||||
make_bone(lower_torso_mat * Mat4::<f32>::from(self.leg_r)),
|
||||
make_bone(base_mat * Mat4::<f32>::from(self.foot_l)),
|
||||
make_bone(base_mat * Mat4::<f32>::from(self.foot_r)),
|
||||
// FIXME: Should this be l_control_mat?
|
||||
// FIXME: Should this be control_l_mat?
|
||||
make_bone(control_mat * hand_l_mat * Mat4::<f32>::from(self.hold)),
|
||||
];
|
||||
Vec3::default()
|
||||
|
@ -74,12 +74,12 @@ impl Animation for AlphaAnimation {
|
||||
let test = (anim_time as f32 * 1.75).sin();
|
||||
|
||||
if let Some(ToolKind::Sword(_)) = active_tool_kind {
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 2.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.1)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -163,40 +163,40 @@ impl Animation for AlphaAnimation {
|
||||
next.shorts.orientation = next.chest.orientation * -0.45;
|
||||
|
||||
// TODO: Fix animation
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.12;
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_l.scale = Vec3::one() * 1.12;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
next.l_control.position = Vec3::new(-10.0 + push * 5.0, 6.0 + push * 5.0, 2.0);
|
||||
next.l_control.orientation = Quaternion::rotation_x(-1.4 + slow * 0.4)
|
||||
next.control_l.position = Vec3::new(-10.0 + push * 5.0, 6.0 + push * 5.0, 2.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(-1.4 + slow * 0.4)
|
||||
* Quaternion::rotation_y(slow * -1.3)
|
||||
* Quaternion::rotation_z(1.4 + slow * -0.5);
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.12;
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.12;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
next.r_control.position = Vec3::new(8.0, 0.0, 0.0);
|
||||
next.r_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.position = Vec3::new(8.0, 0.0, 0.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
// next.r_control.position = Vec3::new(-10.0 + push * 5.0, 6.0 + push * 5.0,
|
||||
// 2.0); next.r_control.orientation =
|
||||
// next.control_r.position = Vec3::new(-10.0 + push * 5.0, 6.0 + push * 5.0,
|
||||
// 2.0); next.control_r.orientation =
|
||||
// Quaternion::rotation_x(-1.4 + slow * 0.4)
|
||||
// * Quaternion::rotation_y(slow * -1.3)
|
||||
// * Quaternion::rotation_z(1.4 + slow * -0.5);
|
||||
// next.r_control.scale = Vec3::one();
|
||||
// next.control_r.scale = Vec3::one();
|
||||
|
||||
// next.r_hand.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
// next.r_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
// next.r_hand.scale = Vec3::one() * 1.05;
|
||||
// next.hand_r.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
// next.hand_r.orientation = Quaternion::rotation_x(1.27);
|
||||
// next.hand_r.scale = Vec3::one() * 1.05;
|
||||
|
||||
// next.control.position = Vec3::new(-10.0 + push * 5.0, 6.0 + push * 5.0, 2.0);
|
||||
// next.control.orientation = Quaternion::rotation_x(-1.4 + slow * 0.4)
|
||||
@ -204,23 +204,23 @@ impl Animation for AlphaAnimation {
|
||||
// * Quaternion::rotation_z(1.4 + slow * -0.5);
|
||||
// next.control.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
slow * -3.0 + quick * 3.0 - 4.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(slow * 0.6)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(slow * 0.6)
|
||||
* Quaternion::rotation_y((slow * -0.2).max(0.0));
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
slow * 3.0 + quick * -3.0 + 5.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(slow * -0.6)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(slow * -0.6)
|
||||
* Quaternion::rotation_y((slow * 0.2).min(0.0));
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.lantern.orientation =
|
||||
Quaternion::rotation_x(slow * -0.7 + 0.4) * Quaternion::rotation_y(slow * 0.4);
|
||||
@ -249,16 +249,16 @@ impl Animation for AlphaAnimation {
|
||||
next.shorts.position = Vec3::new(0.0, 0.0, -5.0);
|
||||
next.shorts.orientation = Quaternion::rotation_z(0.2 + axe * -0.2);
|
||||
|
||||
next.l_hand.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(-0.0, -2.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -278,13 +278,13 @@ impl Animation for AlphaAnimation {
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
},
|
||||
Some(ToolKind::Hammer(_)) => {
|
||||
next.l_hand.position = Vec3::new(-12.0, 0.0, 0.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(-12.0, 0.0, 0.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(-0.0) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(3.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(3.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(-1.57)
|
||||
@ -324,39 +324,39 @@ impl Animation for AlphaAnimation {
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
|
||||
if velocity > 0.5 {
|
||||
next.l_foot.position =
|
||||
next.foot_l.position =
|
||||
Vec3::new(-skeleton_attr.foot.0, foot * -6.0, skeleton_attr.foot.2);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(foot * -0.4)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(foot * -0.4)
|
||||
* Quaternion::rotation_z((slower * 0.3).max(0.0));
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position =
|
||||
next.foot_r.position =
|
||||
Vec3::new(skeleton_attr.foot.0, foot * 6.0, skeleton_attr.foot.2);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(foot * 0.4)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(foot * 0.4)
|
||||
* Quaternion::rotation_z((slower * 0.3).max(0.0));
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
|
||||
next.torso.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.15);
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
} else {
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
-2.5,
|
||||
skeleton_attr.foot.2 + (slower * 2.5).max(0.0),
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(slower * -0.2 - 0.2)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(slower * -0.2 - 0.2)
|
||||
* Quaternion::rotation_z((slower * 1.0).max(0.0));
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
3.5 - slower * 2.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(slower * 0.1)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(slower * 0.1)
|
||||
* Quaternion::rotation_z((slower * 0.5).max(0.0));
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
|
||||
next.torso.orientation = Quaternion::rotation_z(0.0);
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
@ -376,14 +376,14 @@ impl Animation for AlphaAnimation {
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(staff * 0.2) * Quaternion::rotation_z(staff * 0.2);
|
||||
next.l_hand.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.27) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(12.0, 5.5, 2.0);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(12.0, 5.5, 2.0);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.57) * Quaternion::rotation_y(0.2);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(12.0, 8.5, 13.2);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(3.14)
|
||||
@ -427,35 +427,35 @@ impl Animation for AlphaAnimation {
|
||||
* Quaternion::rotation_x(0.0 + decel * -0.08)
|
||||
* Quaternion::rotation_y(decel * 0.08);
|
||||
|
||||
next.l_control.position =
|
||||
next.control_l.position =
|
||||
Vec3::new(-8.0 + accel_slow * 10.0, 8.0 + accel_fast * 3.0, 0.0);
|
||||
next.l_control.orientation = Quaternion::rotation_z(-0.8)
|
||||
next.control_l.orientation = Quaternion::rotation_z(-0.8)
|
||||
* Quaternion::rotation_x(0.0 + accel_med * -0.8)
|
||||
* Quaternion::rotation_y(0.0 + accel_med * -0.4);
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0);
|
||||
|
||||
next.r_control.position = Vec3::new(8.0, 0.0, 0.0);
|
||||
next.r_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_r.position = Vec3::new(8.0, 0.0, 0.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(0.0);
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0);
|
||||
},
|
||||
Some(ToolKind::Debug(_)) => {
|
||||
next.l_hand.position = Vec3::new(-7.0, 4.0, 3.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27)
|
||||
next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(-5.0, 5.0, 23.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_x(PI)
|
||||
@ -473,12 +473,12 @@ impl Animation for AlphaAnimation {
|
||||
skeleton_attr.lantern.2,
|
||||
);
|
||||
next.lantern.scale = Vec3::one() * 0.65;
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -58,12 +58,12 @@ impl Animation for BetaAnimation {
|
||||
let stab = (anim_time as f32 * 2.5).sin();
|
||||
|
||||
if let Some(ToolKind::Sword(_)) = active_tool_kind {
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 2.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.1)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -139,12 +139,12 @@ impl Animation for BetaAnimation {
|
||||
* Quaternion::rotation_x(slow * 0.1)
|
||||
* Quaternion::rotation_y(slow * -0.05);
|
||||
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 6.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3);
|
||||
|
||||
@ -153,17 +153,17 @@ impl Animation for BetaAnimation {
|
||||
* Quaternion::rotation_y(slow * 2.0 + 0.7)
|
||||
* Quaternion::rotation_z(1.7 - slow * 0.4 + fast * 0.6);
|
||||
next.control.scale = Vec3::one();
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
footquick * -9.5,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(footquick * 0.3)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(footquick * 0.3)
|
||||
* Quaternion::rotation_y(footquick * -0.6);
|
||||
|
||||
next.r_foot.position =
|
||||
next.foot_r.position =
|
||||
Vec3::new(skeleton_attr.foot.0, footquick * 9.5, skeleton_attr.foot.2);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(footquick * -0.3)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(footquick * -0.3)
|
||||
* Quaternion::rotation_y(footquick * 0.2);
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
@ -191,12 +191,12 @@ impl Animation for BetaAnimation {
|
||||
* Quaternion::rotation_x(slow * 0.1)
|
||||
* Quaternion::rotation_y(slow * -0.05);
|
||||
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 6.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3);
|
||||
|
||||
@ -205,17 +205,17 @@ impl Animation for BetaAnimation {
|
||||
* Quaternion::rotation_y(slow * 2.0 + 0.7)
|
||||
* Quaternion::rotation_z(1.7 - slow * 0.4 + fast * 0.6);
|
||||
next.control.scale = Vec3::one();
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
footquick * -9.5,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(footquick * 0.3)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(footquick * 0.3)
|
||||
* Quaternion::rotation_y(footquick * -0.6);
|
||||
|
||||
next.r_foot.position =
|
||||
next.foot_r.position =
|
||||
Vec3::new(skeleton_attr.foot.0, footquick * 9.5, skeleton_attr.foot.2);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(footquick * -0.3)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(footquick * -0.3)
|
||||
* Quaternion::rotation_y(footquick * 0.2);
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
@ -223,21 +223,21 @@ impl Animation for BetaAnimation {
|
||||
_ => {},
|
||||
}
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -252,9 +252,9 @@ impl Animation for BetaAnimation {
|
||||
next.lantern.scale = Vec3::one() * 0.65;
|
||||
next.hold.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -71,12 +71,12 @@ impl Animation for BlockAnimation {
|
||||
match active_tool_kind {
|
||||
//TODO: Inventory
|
||||
Some(ToolKind::Sword(_)) => {
|
||||
next.l_hand.position = Vec3::new(0.0, -5.0, -5.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.0, -6.0, -8.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(0.0, -5.0, -5.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.0, -6.0, -8.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, -6.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -90,20 +90,20 @@ impl Animation for BlockAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Axe(_)) => {
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
3.5 + wave_ultra_slow_cos * 0.5,
|
||||
0.0 + wave_ultra_slow * 1.0,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_l.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
3.0 + wave_ultra_slow_cos * 0.5,
|
||||
-2.0 + wave_ultra_slow * 1.0,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(-6.0, 4.5, 0.0 + wave_ultra_slow * 1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -111,16 +111,16 @@ impl Animation for BlockAnimation {
|
||||
next.main.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Hammer(_)) => {
|
||||
next.l_hand.position = Vec3::new(-7.0, 3.5, 6.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(2.07)
|
||||
next.hand_l.position = Vec3::new(-7.0, 3.5, 6.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.07)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(7.0, 2.5, 3.75);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(2.07)
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(7.0, 2.5, 3.75);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(2.07)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(-0.2);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(5.0, 8.75, 5.5);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(-1.35)
|
||||
@ -128,20 +128,20 @@ impl Animation for BlockAnimation {
|
||||
next.main.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
3.5 + wave_ultra_slow_cos * 0.5,
|
||||
0.0 + wave_ultra_slow * 1.0,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_l.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
3.0 + wave_ultra_slow_cos * 0.5,
|
||||
-2.0 + wave_ultra_slow * 1.0,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
4.5 + wave_ultra_slow_cos * 0.5,
|
||||
@ -153,20 +153,20 @@ impl Animation for BlockAnimation {
|
||||
next.main.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Shield(_)) => {
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
3.5 + wave_ultra_slow_cos * 0.5,
|
||||
0.0 + wave_ultra_slow * 1.0,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_l.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
3.0 + wave_ultra_slow_cos * 0.5,
|
||||
-2.0 + wave_ultra_slow * 1.0,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
4.5 + wave_ultra_slow_cos * 0.5,
|
||||
@ -180,19 +180,19 @@ impl Animation for BlockAnimation {
|
||||
_ => {},
|
||||
}
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 5.0, 0.0);
|
||||
next.glider.orientation = Quaternion::rotation_y(0.0);
|
||||
@ -211,9 +211,9 @@ impl Animation for BlockAnimation {
|
||||
next.torso.orientation = Quaternion::rotation_x(0.0);
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -79,12 +79,12 @@ impl Animation for BlockIdleAnimation {
|
||||
match active_tool_kind {
|
||||
//TODO: Inventory
|
||||
Some(ToolKind::Sword(_)) => {
|
||||
next.l_hand.position = Vec3::new(0.0, -5.0, -5.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.0, -6.0, -8.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(0.0, -5.0, -5.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.0, -6.0, -8.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, -6.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -98,20 +98,20 @@ impl Animation for BlockIdleAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Axe(_)) => {
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
3.5 + wave_ultra_slow_cos * 0.5,
|
||||
0.0 + wave_ultra_slow * 1.0,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_l.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(
|
||||
-6.0 + wave_ultra_slow_cos * 1.0,
|
||||
3.0 + wave_ultra_slow_cos * 0.5,
|
||||
-2.0 + wave_ultra_slow * 1.0,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(-6.0, 4.5, 0.0 + wave_ultra_slow * 1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -119,16 +119,16 @@ impl Animation for BlockIdleAnimation {
|
||||
next.main.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Hammer(_)) => {
|
||||
next.l_hand.position = Vec3::new(-7.0, 3.5 + wave_ultra_slow * 2.0, 6.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(2.07)
|
||||
next.hand_l.position = Vec3::new(-7.0, 3.5 + wave_ultra_slow * 2.0, 6.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.07)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(7.0, 2.5 + wave_ultra_slow * 2.0, 3.75);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(2.07)
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(7.0, 2.5 + wave_ultra_slow * 2.0, 3.75);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(2.07)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(-0.2);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(5.0, 8.75 + wave_ultra_slow * 2.0, 5.5);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(-1.35)
|
||||
@ -146,11 +146,11 @@ impl Animation for BlockIdleAnimation {
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.control.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.l_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_l.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
@ -158,17 +158,17 @@ impl Animation for BlockIdleAnimation {
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.main.scale = Vec3::one();
|
||||
|
||||
next.l_control.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.l_control.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
next.control_l.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.control_l.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
// * Quaternion::rotation_y(0.0)
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.l_control.scale = Vec3::one();
|
||||
// next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.r_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_r.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
@ -176,11 +176,11 @@ impl Animation for BlockIdleAnimation {
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.second.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
// next.r_control.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.control_r.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
// next.control_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
// * Quaternion::rotation_y(0.0 * PI)
|
||||
// * Quaternion::rotation_z(0.0 * PI);
|
||||
// next.r_control.scale = Vec3::one();
|
||||
// next.control_r.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Shield(_)) => {
|
||||
// hands should be larger when holding a dagger grip,
|
||||
@ -193,28 +193,28 @@ impl Animation for BlockIdleAnimation {
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.control.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.l_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_l.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
|
||||
next.l_control.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.l_control.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
next.control_l.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.control_l.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
// * Quaternion::rotation_y(0.0)
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.l_control.scale = Vec3::one();
|
||||
// next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.r_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_r.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
@ -222,23 +222,23 @@ impl Animation for BlockIdleAnimation {
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.second.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
// next.r_control.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.control_r.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
// next.control_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
// * Quaternion::rotation_y(0.0 * PI)
|
||||
// * Quaternion::rotation_z(0.0 * PI);
|
||||
// next.r_control.scale = Vec3::one();
|
||||
// next.control_r.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Debug(_)) => {
|
||||
next.l_hand.position = Vec3::new(-7.0, 3.5 + wave_ultra_slow * 2.0, 6.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(2.07)
|
||||
next.hand_l.position = Vec3::new(-7.0, 3.5 + wave_ultra_slow * 2.0, 6.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.07)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(7.0, 2.5 + wave_ultra_slow * 2.0, 3.75);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(2.07)
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(7.0, 2.5 + wave_ultra_slow * 2.0, 3.75);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(2.07)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(-0.2);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(5.0, 8.75 + wave_ultra_slow * 2.0, 5.5);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(-1.35)
|
||||
@ -260,11 +260,11 @@ impl Animation for BlockIdleAnimation {
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.control.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.l_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_l.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
@ -272,17 +272,17 @@ impl Animation for BlockIdleAnimation {
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.main.scale = Vec3::one();
|
||||
|
||||
next.l_control.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.l_control.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
next.control_l.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.control_l.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
// * Quaternion::rotation_y(0.0)
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.l_control.scale = Vec3::one();
|
||||
// next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.r_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_r.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
@ -290,38 +290,38 @@ impl Animation for BlockIdleAnimation {
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.second.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(3.0, 7.0, 5.0);
|
||||
next.r_control.orientation = Quaternion::rotation_x(0.5 * PI)
|
||||
next.control_r.position = Vec3::new(3.0, 7.0, 5.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(0.5 * PI)
|
||||
* Quaternion::rotation_y(0.5 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
// next.r_control.scale = Vec3::one();
|
||||
// next.control_r.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Dagger(_)) => {},
|
||||
_ => {},
|
||||
}
|
||||
|
||||
next.l_foot.position =
|
||||
next.foot_l.position =
|
||||
Vec3::new(-3.4, 0.3, skeleton_attr.foot.1 + wave_ultra_slow_cos * 0.1);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(3.4, 1.2, skeleton_attr.foot.1 + wave_ultra_slow * 0.1);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.3);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.position = Vec3::new(3.4, 1.2, skeleton_attr.foot.1 + wave_ultra_slow * 0.1);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.3);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -340,8 +340,8 @@ impl Animation for BlockIdleAnimation {
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
|
||||
next.control.scale = Vec3::one();
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -98,13 +98,13 @@ impl Animation for ChargeAnimation {
|
||||
match active_tool_kind {
|
||||
//TODO: Inventory
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(12.0, 5.5, 2.0);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(12.0, 5.5, 2.0);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.57) * Quaternion::rotation_y(0.2);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(12.0, 8.5, 13.2);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(3.14)
|
||||
@ -120,16 +120,16 @@ impl Animation for ChargeAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Bow(_)) => {
|
||||
next.l_hand.position = Vec3::new(1.0, -2.0 + stop * -1.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.position = Vec3::new(1.0, -2.0 + stop * -1.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(4.9, 1.0, -5.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(4.9, 1.0, -5.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(3.0, -1.0, -14.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.3)
|
||||
@ -167,21 +167,21 @@ impl Animation for ChargeAnimation {
|
||||
}
|
||||
|
||||
if velocity > 0.2 {
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0 - foot * 1.5,
|
||||
skeleton_attr.foot.1 + foote * 2.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(foote * -0.1)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(foote * -0.1)
|
||||
* Quaternion::rotation_z(0.4)
|
||||
* Quaternion::rotation_y(0.15);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0 + foot * 1.5,
|
||||
skeleton_attr.foot.1 + foote * -1.5,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.0)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_z(0.4)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
|
||||
@ -189,22 +189,22 @@ impl Animation for ChargeAnimation {
|
||||
next.torso.orientation = Quaternion::rotation_z(0.0);
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
} else {
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
-2.5 + stop * -1.3,
|
||||
skeleton_attr.foot.2 + tilt * -4.0 * foot,
|
||||
);
|
||||
next.l_foot.orientation =
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(stop * -0.2 - 0.2 + stop * stress * 0.02)
|
||||
* Quaternion::rotation_z(stop * 0.1)
|
||||
* Quaternion::rotation_y(stop * 0.08);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
3.5 + stop * 1.5,
|
||||
skeleton_attr.foot.2 + tilt * 4.0 * foot,
|
||||
);
|
||||
next.r_foot.orientation =
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_x(stop * 0.1) * Quaternion::rotation_z(stop * 0.1);
|
||||
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
|
||||
@ -215,19 +215,19 @@ impl Animation for ChargeAnimation {
|
||||
next.back.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.back.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -240,9 +240,9 @@ impl Animation for ChargeAnimation {
|
||||
next.lantern.orientation = Quaternion::rotation_x(0.1) * Quaternion::rotation_y(0.1);
|
||||
next.lantern.scale = Vec3::one() * 0.65;
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -102,21 +102,21 @@ impl Animation for ClimbAnimation {
|
||||
* Quaternion::rotation_y(quick * 0.10);
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
4.0 + skeleton_attr.hand.1 + quicka * 1.5,
|
||||
5.0 + skeleton_attr.hand.2 - quick * 4.0,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(2.2 + quicka * 0.5);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.2 + quicka * 0.5);
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
5.0 + skeleton_attr.hand.1 - quicka * 1.5,
|
||||
5.0 + skeleton_attr.hand.2 + quick * 4.0,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(2.2 - quicka * 0.5);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.orientation = Quaternion::rotation_x(2.2 - quicka * 0.5);
|
||||
next.hand_r.scale = Vec3::one();
|
||||
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Dagger(_)) => {
|
||||
@ -155,37 +155,37 @@ impl Animation for ClimbAnimation {
|
||||
},
|
||||
}
|
||||
next.second.scale = Vec3::one();
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
5.0 + skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2 + quick * 2.5,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(0.2 - quicka * 0.5);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.2 - quicka * 0.5);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
4.0 + skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2 - quick * 2.5,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.2 + quicka * 0.5);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.2 + quicka * 0.5);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(smootha * 0.15);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(smootha * 0.15);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(smooth * 0.15);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(smooth * 0.15);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -243,56 +243,56 @@ impl Animation for ClimbAnimation {
|
||||
next.shorts.orientation = Quaternion::rotation_x(0.1 + dropa * 0.12 * (1.0 - stagnant));
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
7.5 + stagnant * -5.0 + skeleton_attr.hand.1,
|
||||
7.0 + stagnant * -7.0 + skeleton_attr.hand.2 + dropa * -1.0 * (1.0 - stagnant),
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(2.2 + stagnant * -1.4)
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.2 + stagnant * -1.4)
|
||||
* Quaternion::rotation_y((0.3 + dropa * 0.1) * (1.0 - stagnant));
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
7.5 + stagnant * -2.5 + skeleton_attr.hand.1,
|
||||
5.0 + skeleton_attr.hand.2 + drop * -1.0 * (1.0 - stagnant),
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(2.2)
|
||||
next.hand_r.orientation = Quaternion::rotation_x(2.2)
|
||||
* Quaternion::rotation_y(-0.3 + drop * 0.1 * (1.0 - stagnant));
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
4.0 + stagnant * 3.0 + skeleton_attr.foot.1,
|
||||
1.0 + skeleton_attr.foot.2 + drop * -2.0 * (1.0 - stagnant),
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(0.55 + drop * 0.1 * (1.0 - stagnant));
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.55 + drop * 0.1 * (1.0 - stagnant));
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
2.0 + stagnant * 4.0 + skeleton_attr.foot.1,
|
||||
-2.0 + skeleton_attr.foot.2 + smooth * 1.0 * (1.0 - stagnant),
|
||||
);
|
||||
next.r_foot.orientation =
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_x(0.2 + smooth * 0.15 * (1.0 - stagnant));
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -318,8 +318,8 @@ impl Animation for ClimbAnimation {
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
};
|
||||
next.control.scale = Vec3::one();
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -84,57 +84,57 @@ impl Animation for DanceAnimation {
|
||||
next.shorts.orientation = Quaternion::rotation_z(foot * 0.35);
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
1.0 - skeleton_attr.hand.0,
|
||||
2.0 + skeleton_attr.hand.1 + shortealt * -3.0,
|
||||
skeleton_attr.hand.2 + shortealt * -0.75,
|
||||
);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.4 + foot * 0.15) * Quaternion::rotation_y(0.2);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
-1.0 + skeleton_attr.hand.0,
|
||||
2.0 + skeleton_attr.hand.1 + shortealt * 3.0,
|
||||
skeleton_attr.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.r_hand.orientation =
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.4 + foot * -0.15) * Quaternion::rotation_y(-0.2);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0 + foot * 0.8,
|
||||
1.5 + -skeleton_attr.foot.1 + foot * -4.0,
|
||||
skeleton_attr.foot.2 + 2.0,
|
||||
);
|
||||
next.l_foot.orientation =
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(foot * -0.3) * Quaternion::rotation_z(short * -0.15);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0 + foot * 0.8,
|
||||
1.5 + -skeleton_attr.foot.1 + foot * 4.0,
|
||||
skeleton_attr.foot.2 + 2.0,
|
||||
);
|
||||
next.r_foot.orientation =
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_x(foot * 0.3) * Quaternion::rotation_z(short * 0.15);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(shorte * 0.15);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(shorte * 0.15);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(shorte * -0.15);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(shorte * -0.15);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -194,9 +194,9 @@ impl Animation for DanceAnimation {
|
||||
next.control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -73,12 +73,12 @@ impl Animation for DashAnimation {
|
||||
|
||||
next.head.position = Vec3::new(0.0, -2.0 + skeleton_attr.head.0, skeleton_attr.head.1);
|
||||
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 2.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.1)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -99,13 +99,13 @@ impl Animation for DashAnimation {
|
||||
* Quaternion::rotation_y(movement * 1.5)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + movement * -12.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(movement * -1.0);
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_l.orientation = Quaternion::rotation_x(movement * -1.0);
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
@ -139,21 +139,21 @@ impl Animation for DashAnimation {
|
||||
|
||||
next.shorts.orientation = Quaternion::rotation_z(short * 0.25);
|
||||
next.belt.orientation = Quaternion::rotation_z(short * 0.1);
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
2.0 - skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothoril * -7.5,
|
||||
2.0 + skeleton_attr.foot.2 + ((footvertl * -4.0).max(-1.0)),
|
||||
);
|
||||
next.l_foot.orientation =
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(-0.6 + footrotl * -0.6)
|
||||
* Quaternion::rotation_z(-0.2);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
2.0 + skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothorir * -7.5,
|
||||
2.0 + skeleton_attr.foot.2 + ((footvertr * -4.0).max(-1.0)),
|
||||
);
|
||||
next.r_foot.orientation =
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_x(-0.6 + footrotr * -0.6)
|
||||
* Quaternion::rotation_z(-0.2);
|
||||
},
|
||||
@ -205,12 +205,12 @@ impl Animation for DashAnimation {
|
||||
next.shorts.position = Vec3::new(0.0, 3.0, -3.0);
|
||||
next.shorts.orientation = Quaternion::rotation_x(0.4) * Quaternion::rotation_z(0.3);
|
||||
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 6.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.main.scale = Vec3::one();
|
||||
@ -219,11 +219,11 @@ impl Animation for DashAnimation {
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(-0.3) * Quaternion::rotation_z(1.1 + slow * 0.2);
|
||||
next.control.scale = Vec3::one();
|
||||
next.l_foot.position = Vec3::new(-1.4, 2.0, skeleton_attr.foot.2);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(-0.8);
|
||||
next.foot_l.position = Vec3::new(-1.4, 2.0, skeleton_attr.foot.2);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.8);
|
||||
|
||||
next.r_foot.position = Vec3::new(5.4, -1.0, skeleton_attr.foot.2);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(-0.8);
|
||||
next.foot_r.position = Vec3::new(5.4, -1.0, skeleton_attr.foot.2);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(-0.8);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
@ -254,31 +254,31 @@ impl Animation for DashAnimation {
|
||||
next.control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.position = Vec3::new(-8.0, -10.0, 0.0);
|
||||
next.control_l.position = Vec3::new(-8.0, -10.0, 0.0);
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0);
|
||||
next.main.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(8.0, 10.0, 0.0);
|
||||
next.control_r.position = Vec3::new(8.0, 10.0, 0.0);
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 6.0, -1.0);
|
||||
next.second.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.second.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(-1.4, 2.0, skeleton_attr.foot.2);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(-0.8);
|
||||
next.foot_l.position = Vec3::new(-1.4, 2.0, skeleton_attr.foot.2);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.8);
|
||||
|
||||
next.r_foot.position = Vec3::new(5.4, -1.0, skeleton_attr.foot.2);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(-0.8);
|
||||
next.foot_r.position = Vec3::new(5.4, -1.0, skeleton_attr.foot.2);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(-0.8);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
@ -294,9 +294,9 @@ impl Animation for DashAnimation {
|
||||
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -41,14 +41,14 @@ impl Animation for EquipAnimation {
|
||||
match active_tool_kind {
|
||||
//TODO: Inventory
|
||||
Some(ToolKind::Sword(_)) => {
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.57) * Quaternion::rotation_y(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.57) * Quaternion::rotation_y(0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, -6.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -62,16 +62,16 @@ impl Animation for EquipAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Axe(_)) => {
|
||||
next.l_hand.position = Vec3::new(-4.0, 3.0, 6.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(-0.3)
|
||||
next.hand_l.position = Vec3::new(-4.0, 3.0, 6.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_z(3.14 - 0.3)
|
||||
* Quaternion::rotation_y(-0.8);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(-2.5, 9.0, 4.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(-0.3)
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(-2.5, 9.0, 4.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_z(3.14 - 0.3)
|
||||
* Quaternion::rotation_y(-0.8);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(-6.0, 10.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(1.27)
|
||||
* Quaternion::rotation_y(-0.3)
|
||||
@ -84,14 +84,14 @@ impl Animation for EquipAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Hammer(_)) => {
|
||||
next.l_hand.position = Vec3::new(-7.0, 5.5, 3.5);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(-7.0, 5.5, 3.5);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.32);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(8.0, 7.75, 0.0);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(8.0, 7.75, 0.0);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.22);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(6.0, 7.0, 0.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(-1.35) * Quaternion::rotation_z(1.57);
|
||||
@ -104,14 +104,14 @@ impl Animation for EquipAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, -4.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, -4.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.27) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 2.0);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 2.0);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.57) * Quaternion::rotation_y(0.2);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 13.2);
|
||||
next.main.orientation = Quaternion::rotation_y(3.14);
|
||||
|
||||
@ -122,27 +122,27 @@ impl Animation for EquipAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Shield(_)) => {
|
||||
next.l_hand.position = Vec3::new(-6.0, 3.5, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(-6.0, 3.0, -2.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_l.position = Vec3::new(-6.0, 3.5, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(-6.0, 3.0, -2.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(-6.0, 4.5, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.main.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Bow(_)) => {
|
||||
next.l_hand.position = Vec3::new(2.0, 1.5, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.position = Vec3::new(2.0, 1.5, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(5.9, 4.5, -5.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(5.9, 4.5, -5.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(3.0, 2.0, -13.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.3)
|
||||
@ -157,28 +157,28 @@ impl Animation for EquipAnimation {
|
||||
},
|
||||
Some(ToolKind::Dagger(_)) => {
|
||||
// TODO: Fix animation
|
||||
// next.l_hand.position = Vec3::new(-6.0, 3.5, 0.0);
|
||||
// next.l_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
// next.l_hand.scale = Vec3::one() * 1.01;
|
||||
// next.hand_l.position = Vec3::new(-6.0, 3.5, 0.0);
|
||||
// next.hand_l.orientation = Quaternion::rotation_x(-0.3);
|
||||
// next.hand_l.scale = Vec3::one() * 1.01;
|
||||
|
||||
// next.main.position = Vec3::new(-6.0, 4.5, 0.0);
|
||||
// next.main.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.main.scale = Vec3::one();
|
||||
|
||||
// next.r_hand.position = Vec3::new(-6.0, 3.0, -2.0);
|
||||
// next.r_hand.orientation = Quaternion::rotation_x(-0.3);
|
||||
// next.r_hand.scale = Vec3::one() * 1.01;
|
||||
// next.hand_r.position = Vec3::new(-6.0, 3.0, -2.0);
|
||||
// next.hand_r.orientation = Quaternion::rotation_x(-0.3);
|
||||
// next.hand_r.scale = Vec3::one() * 1.01;
|
||||
},
|
||||
Some(ToolKind::Debug(_)) => {
|
||||
next.l_hand.position = Vec3::new(-7.0, 4.0, 3.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27 + wave * 0.25)
|
||||
next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27 + wave * 0.25)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(7.0, 2.5, -1.25);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(7.0, 2.5, -1.25);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.27 + wave * 0.25) * Quaternion::rotation_z(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(5.0, 8.75, -2.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(-1.27)
|
||||
@ -213,19 +213,19 @@ impl Animation for EquipAnimation {
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_z(head_look.x) * Quaternion::rotation_x(head_look.y);
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(wave_ultra_slow_cos * 0.035 - 0.2);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(wave_ultra_slow_cos * 0.035 - 0.2);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(wave_ultra_slow * 0.035);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(wave_ultra_slow * 0.035);
|
||||
|
||||
next.chest.position = Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1);
|
||||
|
||||
|
@ -110,21 +110,21 @@ impl Animation for GlideWieldAnimation {
|
||||
0.0
|
||||
} * 1.3;
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-2.0 - skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2 + 15.0,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(3.35);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.orientation = Quaternion::rotation_x(3.35);
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
2.0 + skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2 + 15.0,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(3.35);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.orientation = Quaternion::rotation_x(3.35);
|
||||
next.hand_r.scale = Vec3::one();
|
||||
|
||||
if speed > 0.5 {
|
||||
next.head.position = Vec3::new(
|
||||
@ -169,41 +169,41 @@ impl Animation for GlideWieldAnimation {
|
||||
* Quaternion::rotation_y(tilt * 0.7);
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
-1.5 + skeleton_attr.foot.1 + foothoril * -8.5 * walkintensity - lower * 1.0,
|
||||
2.0 + skeleton_attr.foot.2 + ((footvertl * -2.7).max(-1.0)) * walkintensity,
|
||||
);
|
||||
next.l_foot.orientation =
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(-0.2 + footrotl * -1.2 * walkintensity)
|
||||
* Quaternion::rotation_y(tilt * 1.8);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
-1.5 + skeleton_attr.foot.1 + foothorir * -8.5 * walkintensity - lower * 1.0,
|
||||
2.0 + skeleton_attr.foot.2 + ((footvertr * -2.7).max(-1.0)) * walkintensity,
|
||||
);
|
||||
next.r_foot.orientation =
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_x(-0.2 + footrotr * -1.2 * walkintensity)
|
||||
* Quaternion::rotation_y(tilt * 1.8);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(short * 0.15 * walkintensity);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(short * 0.15 * walkintensity);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(short * -0.15 * walkintensity);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(short * -0.15 * walkintensity);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Dagger(_)) => {
|
||||
@ -261,9 +261,9 @@ impl Animation for GlideWieldAnimation {
|
||||
next.control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
} else {
|
||||
next.head.position = Vec3::new(
|
||||
0.0,
|
||||
@ -297,33 +297,33 @@ impl Animation for GlideWieldAnimation {
|
||||
next.shorts.orientation = Quaternion::rotation_z(head_look.x * -0.2);
|
||||
next.shorts.scale = Vec3::one() + breathe * -0.03;
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
next.shoulder_l.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
next.shoulder_r.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Dagger(_)) => {
|
||||
@ -378,9 +378,9 @@ impl Animation for GlideWieldAnimation {
|
||||
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
}
|
||||
|
||||
next.second.scale = match (
|
||||
|
@ -89,45 +89,45 @@ impl Animation for GlidingAnimation {
|
||||
next.shorts.position = Vec3::new(0.0, skeleton_attr.shorts.0, skeleton_attr.shorts.1);
|
||||
next.shorts.orientation = Quaternion::rotation_z(slowa * 0.12 + tilt * tiltcancel * 16.0);
|
||||
|
||||
next.l_hand.position = Vec3::new(-9.5, -3.0, 10.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(-2.7 + slowa * -0.1);
|
||||
next.hand_l.position = Vec3::new(-9.5, -3.0, 10.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(-2.7 + slowa * -0.1);
|
||||
|
||||
next.r_hand.position = Vec3::new(9.5, -3.0, 10.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(-2.7 + slowa * -0.10);
|
||||
next.hand_r.position = Vec3::new(9.5, -3.0, 10.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(-2.7 + slowa * -0.10);
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + slowa * -1.0 + tilt * tiltcancel * -35.0,
|
||||
-1.0 + skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(
|
||||
next.foot_l.orientation = Quaternion::rotation_x(
|
||||
(wave_stop * -0.7 - quicka * -0.21 + slow * 0.19) * speed * 0.04,
|
||||
) * Quaternion::rotation_z(tilt * tiltcancel * 20.0);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + slowa * 1.0 + tilt * tiltcancel * 35.0,
|
||||
-1.0 + skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(
|
||||
next.foot_r.orientation = Quaternion::rotation_x(
|
||||
(wave_stop * -0.8 + quick * -0.25 + slowb * 0.13) * speed * 0.04,
|
||||
) * Quaternion::rotation_z(tilt * tiltcancel * 20.0);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, -13.0 + slow * 0.10, 8.0);
|
||||
next.glider.orientation =
|
||||
@ -170,9 +170,9 @@ impl Animation for GlidingAnimation {
|
||||
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -62,52 +62,52 @@ impl Animation for IdleAnimation {
|
||||
next.back.position = Vec3::new(0.0, skeleton_attr.back.0, skeleton_attr.back.1);
|
||||
next.back.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + wave_ultra_slow_cos * 0.15,
|
||||
skeleton_attr.hand.2 + wave_ultra_slow * 0.5,
|
||||
);
|
||||
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0 + wave_ultra_slow * -0.06);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0 + wave_ultra_slow * -0.06);
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + wave_ultra_slow_cos * 0.15,
|
||||
skeleton_attr.hand.2 + wave_ultra_slow * 0.5 + head_abs * -0.05,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0 + wave_ultra_slow * -0.06);
|
||||
next.r_hand.scale = Vec3::one() + head_abs * -0.05;
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0 + wave_ultra_slow * -0.06);
|
||||
next.hand_r.scale = Vec3::one() + head_abs * -0.05;
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_shoulder.scale = (Vec3::one() + head_abs * -0.05) * 1.15;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_l.scale = (Vec3::one() + head_abs * -0.05) * 1.15;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_shoulder.scale = (Vec3::one() + head_abs * -0.05) * 1.15;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_r.scale = (Vec3::one() + head_abs * -0.05) * 1.15;
|
||||
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
|
||||
@ -165,13 +165,13 @@ impl Animation for IdleAnimation {
|
||||
next.control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -81,74 +81,74 @@ impl Animation for JumpAnimation {
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
if random > 0.5 {
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
1.0 + skeleton_attr.hand.1 + 4.0,
|
||||
2.0 + skeleton_attr.hand.2 + slow * 1.5,
|
||||
);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.9 + slow * 0.4) * Quaternion::rotation_y(0.2);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 - 3.0,
|
||||
skeleton_attr.hand.2 + slow * 1.5,
|
||||
);
|
||||
next.r_hand.orientation =
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(-0.5 + slow * -0.4) * Quaternion::rotation_y(-0.2);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.scale = Vec3::one();
|
||||
} else {
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 - 3.0,
|
||||
skeleton_attr.hand.2 + slow * 1.5,
|
||||
);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(-0.5 + slow * -0.4) * Quaternion::rotation_y(0.2);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
1.0 + skeleton_attr.hand.1 + 4.0,
|
||||
2.0 + skeleton_attr.hand.2 + slow * 1.5,
|
||||
);
|
||||
next.r_hand.orientation =
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.9 + slow * 0.4) * Quaternion::rotation_y(-0.2);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.scale = Vec3::one();
|
||||
};
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 - 6.0 * switch,
|
||||
1.0 + skeleton_attr.foot.2 + slow * 1.5,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(-1.2 * switch + slow * -0.2 * switch);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-1.2 * switch + slow * -0.2 * switch);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + 6.0 * switch,
|
||||
1.0 + skeleton_attr.foot.2 + slow * 1.5,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(1.2 * switch + slow * 0.2 * switch);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.orientation = Quaternion::rotation_x(1.2 * switch + slow * 0.2 * switch);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(0.4 * switch);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.4 * switch);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(-0.4 * switch);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(-0.4 * switch);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -208,13 +208,13 @@ impl Animation for JumpAnimation {
|
||||
next.control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -37,12 +37,12 @@ impl Animation for LeapAnimation {
|
||||
let movement = (anim_time as f32 * 1.0).min(1.0);
|
||||
|
||||
if let Some(ToolKind::Hammer(_)) = active_tool_kind {
|
||||
next.l_hand.position = Vec3::new(-12.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(PI) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(2.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(PI) * Quaternion::rotation_y(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_l.position = Vec3::new(-12.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI) * Quaternion::rotation_y(0.0);
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(2.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(PI) * Quaternion::rotation_y(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_y(-1.57) * Quaternion::rotation_z(1.57);
|
||||
|
||||
@ -86,19 +86,19 @@ impl Animation for LeapAnimation {
|
||||
* Quaternion::rotation_y(movement * -0.1)
|
||||
* Quaternion::rotation_z(-0.4 + movement * -0.2);
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 - 5.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(-0.8);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.8);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + 8.0,
|
||||
skeleton_attr.foot.2 + 5.0,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.9);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.9);
|
||||
},
|
||||
StageSection::Swing => {
|
||||
next.control.position =
|
||||
@ -113,21 +113,21 @@ impl Animation for LeapAnimation {
|
||||
* Quaternion::rotation_y(-0.1)
|
||||
* Quaternion::rotation_z(-0.6 + movement * 0.6);
|
||||
|
||||
next.l_hand.position = Vec3::new(-12.0 + movement * 10.0, 0.0, 0.0);
|
||||
next.hand_l.position = Vec3::new(-12.0 + movement * 10.0, 0.0, 0.0);
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + 8.0,
|
||||
skeleton_attr.foot.2 - 5.0,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(0.9);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.9);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 - 5.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(-0.8);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(-0.8);
|
||||
},
|
||||
StageSection::Recover => {
|
||||
next.control.position = Vec3::new(-4.0, 17.0, -1.0);
|
||||
@ -141,22 +141,22 @@ impl Animation for LeapAnimation {
|
||||
* Quaternion::rotation_y(-0.1)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
|
||||
next.l_hand.position = Vec3::new(-2.0, 0.0, 0.0);
|
||||
next.hand_l.position = Vec3::new(-2.0, 0.0, 0.0);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
} else if let Some(ToolKind::Axe(_)) = active_tool_kind {
|
||||
next.l_hand.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(-0.0, -2.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -187,21 +187,21 @@ impl Animation for LeapAnimation {
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(0.0 + movement * -0.4);
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2 - 8.0,
|
||||
);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2 - 8.0,
|
||||
);
|
||||
|
||||
next.l_foot.orientation = Quaternion::rotation_x(movement * 0.9);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(movement * 0.9);
|
||||
|
||||
next.r_foot.orientation = Quaternion::rotation_x(movement * 0.9);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(movement * 0.9);
|
||||
|
||||
next.belt.orientation = Quaternion::rotation_x(movement * 0.22);
|
||||
next.shorts.orientation = Quaternion::rotation_x(movement * 0.3);
|
||||
@ -229,19 +229,19 @@ impl Animation for LeapAnimation {
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.head.orientation = Quaternion::rotation_x(-0.4 + movement * 0.4);
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + movement * 4.0,
|
||||
skeleton_attr.foot.2 - 8.0 + movement * 3.0,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(0.9);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.9);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + movement * 4.0,
|
||||
skeleton_attr.foot.2 - 8.0 + movement * 3.0,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.9);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.9);
|
||||
next.chest.position =
|
||||
Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1 - 8.0);
|
||||
next.torso.position =
|
||||
@ -266,21 +266,21 @@ impl Animation for LeapAnimation {
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(movement * 0.2);
|
||||
|
||||
next.l_hand.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.hand_l.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + 4.0 + movement * -8.0,
|
||||
skeleton_attr.foot.2 - 5.0 + movement * -3.0,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(0.9 - movement * 1.8);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.9 - movement * 1.8);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + 4.0 + movement * -8.0,
|
||||
skeleton_attr.foot.2 - 5.0 + movement * -3.0,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.9 - movement * 1.8);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.9 - movement * 1.8);
|
||||
|
||||
next.torso.orientation =
|
||||
Quaternion::rotation_x(-1.9 * PI - movement * 0.2 * PI);
|
||||
@ -298,7 +298,7 @@ impl Animation for LeapAnimation {
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(0.2);
|
||||
|
||||
next.l_hand.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.hand_l.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
|
||||
next.chest.position =
|
||||
Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1 - 8.0);
|
||||
@ -306,19 +306,19 @@ impl Animation for LeapAnimation {
|
||||
Vec3::new(0.0, 0.0, 0.0 + 8.0) * skeleton_attr.scaler / 11.0;
|
||||
next.torso.orientation =
|
||||
Quaternion::rotation_x(-6.7 + movement * -0.1 * PI);
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 - 4.0,
|
||||
skeleton_attr.foot.2 - 8.0,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(-0.9);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.9);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 - 4.0,
|
||||
skeleton_attr.foot.2 - 8.0,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(-0.9);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(-0.9);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -53,12 +53,12 @@ skeleton_impls!(struct CharacterSkeleton {
|
||||
+ belt,
|
||||
+ back,
|
||||
+ shorts,
|
||||
+ l_hand,
|
||||
+ r_hand,
|
||||
+ l_foot,
|
||||
+ r_foot,
|
||||
+ l_shoulder,
|
||||
+ r_shoulder,
|
||||
+ hand_l,
|
||||
+ hand_r,
|
||||
+ foot_l,
|
||||
+ foot_r,
|
||||
+ shoulder_l,
|
||||
+ shoulder_r,
|
||||
+ glider,
|
||||
+ main,
|
||||
+ second,
|
||||
@ -66,8 +66,8 @@ skeleton_impls!(struct CharacterSkeleton {
|
||||
+ hold,
|
||||
torso,
|
||||
control,
|
||||
l_control,
|
||||
r_control,
|
||||
control_l,
|
||||
control_r,
|
||||
});
|
||||
|
||||
impl Skeleton for CharacterSkeleton {
|
||||
@ -90,10 +90,10 @@ impl Skeleton for CharacterSkeleton {
|
||||
let head_mat = chest_mat * Mat4::<f32>::from(self.head);
|
||||
let shorts_mat = chest_mat * Mat4::<f32>::from(self.shorts);
|
||||
let control_mat = chest_mat * Mat4::<f32>::from(self.control);
|
||||
let l_control_mat = control_mat * Mat4::<f32>::from(self.l_control);
|
||||
let r_control_mat = control_mat * Mat4::<f32>::from(self.r_control);
|
||||
let control_l_mat = control_mat * Mat4::<f32>::from(self.control_l);
|
||||
let control_r_mat = control_mat * Mat4::<f32>::from(self.control_r);
|
||||
|
||||
let l_hand_mat = Mat4::<f32>::from(self.l_hand);
|
||||
let hand_l_mat = Mat4::<f32>::from(self.hand_l);
|
||||
let lantern_mat = Mat4::<f32>::from(self.lantern);
|
||||
|
||||
*(<&mut [_; Self::BONE_COUNT]>::try_from(&mut buf[0..Self::BONE_COUNT]).unwrap()) = [
|
||||
@ -102,18 +102,18 @@ impl Skeleton for CharacterSkeleton {
|
||||
make_bone(chest_mat * Mat4::<f32>::from(self.belt)),
|
||||
make_bone(chest_mat * Mat4::<f32>::from(self.back)),
|
||||
make_bone(shorts_mat),
|
||||
make_bone(l_control_mat * l_hand_mat),
|
||||
make_bone(r_control_mat * Mat4::<f32>::from(self.r_hand)),
|
||||
make_bone(torso_mat * Mat4::<f32>::from(self.l_foot)),
|
||||
make_bone(torso_mat * Mat4::<f32>::from(self.r_foot)),
|
||||
make_bone(chest_mat * Mat4::<f32>::from(self.l_shoulder)),
|
||||
make_bone(chest_mat * Mat4::<f32>::from(self.r_shoulder)),
|
||||
make_bone(control_l_mat * hand_l_mat),
|
||||
make_bone(control_r_mat * Mat4::<f32>::from(self.hand_r)),
|
||||
make_bone(torso_mat * Mat4::<f32>::from(self.foot_l)),
|
||||
make_bone(torso_mat * Mat4::<f32>::from(self.foot_r)),
|
||||
make_bone(chest_mat * Mat4::<f32>::from(self.shoulder_l)),
|
||||
make_bone(chest_mat * Mat4::<f32>::from(self.shoulder_r)),
|
||||
make_bone(chest_mat * Mat4::<f32>::from(self.glider)),
|
||||
make_bone(l_control_mat * Mat4::<f32>::from(self.main)),
|
||||
make_bone(r_control_mat * Mat4::<f32>::from(self.second)),
|
||||
make_bone(control_l_mat * Mat4::<f32>::from(self.main)),
|
||||
make_bone(control_r_mat * Mat4::<f32>::from(self.second)),
|
||||
make_bone(shorts_mat * lantern_mat),
|
||||
// FIXME: Should this be l_control_mat?
|
||||
make_bone(control_mat * l_hand_mat * Mat4::<f32>::from(self.hold)),
|
||||
// FIXME: Should this be control_l_mat?
|
||||
make_bone(control_mat * hand_l_mat * Mat4::<f32>::from(self.hold)),
|
||||
];
|
||||
// NOTE: lantern_mat.cols.w = lantern_mat * Vec4::unit_w()
|
||||
(head_mat * lantern_mat.cols.w).xyz()
|
||||
|
@ -72,53 +72,53 @@ impl Animation for RollAnimation {
|
||||
);
|
||||
next.shorts.orientation = Quaternion::rotation_x(0.8);
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + 1.0,
|
||||
skeleton_attr.hand.2 + 2.0,
|
||||
);
|
||||
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.6);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.6);
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
-1.0 + skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + 1.0,
|
||||
skeleton_attr.hand.2 + 2.0,
|
||||
);
|
||||
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.6);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.6);
|
||||
next.hand_r.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
1.0 - skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + 5.5,
|
||||
skeleton_attr.foot.2 - 5.0,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(0.9);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.9);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + 5.5,
|
||||
skeleton_attr.foot.2 - 5.0,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.9);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.9);
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1 + 2.0,
|
||||
skeleton_attr.shoulder.2 + 1.0,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -178,13 +178,13 @@ impl Animation for RollAnimation {
|
||||
next.control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -159,57 +159,57 @@ impl Animation for RunAnimation {
|
||||
* Quaternion::rotation_y(tilt * 0.7);
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0 + foothorir * -1.3,
|
||||
3.0 + skeleton_attr.hand.1 + foothorir * -7.0 * walkintensity,
|
||||
1.5 + skeleton_attr.hand.2 - foothorir * 5.5 * walkintensity,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.6 + footrotr * -1.2 * walkintensity)
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.6 + footrotr * -1.2 * walkintensity)
|
||||
* Quaternion::rotation_y(footrotr * 0.4 * walkintensity);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0 + foothoril * 1.3,
|
||||
3.0 + skeleton_attr.hand.1 + foothoril * -6.5 * walkintensity,
|
||||
1.5 + skeleton_attr.hand.2 - foothoril * 7.0 * walkintensity,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.6 + footrotl * -1.2 * walkintensity)
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.6 + footrotl * -1.2 * walkintensity)
|
||||
* Quaternion::rotation_y(footrotl * -0.4 * walkintensity);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
-1.5 + skeleton_attr.foot.1 + foothoril * -8.5 * walkintensity - lower * 1.0,
|
||||
2.0 + skeleton_attr.foot.2 + ((footvertl * -2.7).max(-1.0)) * walkintensity,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(-0.2 + footrotl * -1.2 * walkintensity)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.2 + footrotl * -1.2 * walkintensity)
|
||||
* Quaternion::rotation_y(tilt * 1.8);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
-1.5 + skeleton_attr.foot.1 + foothorir * -8.5 * walkintensity - lower * 1.0,
|
||||
2.0 + skeleton_attr.foot.2 + ((footvertr * -2.7).max(-1.0)) * walkintensity,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(-0.2 + footrotr * -1.2 * walkintensity)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(-0.2 + footrotr * -1.2 * walkintensity)
|
||||
* Quaternion::rotation_y(tilt * 1.8);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(short * 0.15 * walkintensity);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(short * 0.15 * walkintensity);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(short * -0.15 * walkintensity);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(short * -0.15 * walkintensity);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -269,9 +269,9 @@ impl Animation for RunAnimation {
|
||||
next.control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -66,14 +66,14 @@ impl Animation for ShootAnimation {
|
||||
match active_tool_kind {
|
||||
//TODO: Inventory
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(11.0, 5.0, -4.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.27) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(12.0, 5.5, 2.0);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(12.0, 5.5, 2.0);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.57) * Quaternion::rotation_y(0.2);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(12.0, 8.5, 13.2);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(3.14)
|
||||
@ -86,17 +86,17 @@ impl Animation for ShootAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Bow(_)) => {
|
||||
next.l_hand.position =
|
||||
next.hand_l.position =
|
||||
Vec3::new(1.0 - exp * 2.0, -4.0 - exp * 4.0, -1.0 + exp * 6.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6 + exp * 0.8)
|
||||
* Quaternion::rotation_z(-0.3 + exp * 0.9);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(4.9, 3.0, -4.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(4.9, 3.0, -4.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(3.0, 2.0, -13.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.3)
|
||||
@ -111,40 +111,40 @@ impl Animation for ShootAnimation {
|
||||
_ => {},
|
||||
}
|
||||
if velocity > 0.5 {
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0 - foot * 1.0 + exp * -1.0,
|
||||
foote * 0.8 + exp * 1.5,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(exp * 0.5)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(exp * 0.5)
|
||||
* Quaternion::rotation_z(exp * 0.4)
|
||||
* Quaternion::rotation_y(0.15);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0 + foot * 1.0 + exp * 1.0,
|
||||
foote * -0.8 + exp * -1.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(exp * -0.5)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(exp * -0.5)
|
||||
* Quaternion::rotation_z(exp * 0.4)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
|
||||
next.torso.orientation = Quaternion::rotation_x(-0.15);
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
} else {
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
-2.5,
|
||||
skeleton_attr.foot.2 + exp * 2.5,
|
||||
);
|
||||
next.l_foot.orientation =
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(exp * -0.2 - 0.2) * Quaternion::rotation_z(exp * 1.0);
|
||||
|
||||
next.r_foot.position =
|
||||
next.foot_r.position =
|
||||
Vec3::new(skeleton_attr.foot.0, 3.5 - exp * 2.0, skeleton_attr.foot.2);
|
||||
next.r_foot.orientation =
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_x(exp * 0.1) * Quaternion::rotation_z(exp * 0.5);
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.1) * skeleton_attr.scaler;
|
||||
next.torso.orientation = Quaternion::rotation_z(0.0);
|
||||
@ -154,13 +154,13 @@ impl Animation for ShootAnimation {
|
||||
next.back.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.back.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.l_shoulder.position = Vec3::new(-5.0, 0.0, 4.7);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.position = Vec3::new(-5.0, 0.0, 4.7);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(5.0, 0.0, 4.7);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.position = Vec3::new(5.0, 0.0, 4.7);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 5.0, 0.0);
|
||||
next.glider.orientation = Quaternion::rotation_y(0.0);
|
||||
@ -181,13 +181,13 @@ impl Animation for ShootAnimation {
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.hold.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.l_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -74,53 +74,53 @@ impl Animation for SitAnimation {
|
||||
next.shorts.orientation = Quaternion::rotation_x(stop * 0.6);
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + slowa * 0.15,
|
||||
skeleton_attr.hand.2 + slow * 0.7 + stop * -2.0,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(slowa * -0.1 + slow * 0.1);
|
||||
next.l_hand.scale = Vec3::one() + slow_abs * -0.05;
|
||||
next.hand_l.orientation = Quaternion::rotation_x(slowa * -0.1 + slow * 0.1);
|
||||
next.hand_l.scale = Vec3::one() + slow_abs * -0.05;
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + slowa * 0.15,
|
||||
skeleton_attr.hand.2 + slow * 0.7 + stop * -2.0,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(slow * -0.1 + slowa * 0.1);
|
||||
next.r_hand.scale = Vec3::one() + slow_abs * -0.05;
|
||||
next.hand_r.orientation = Quaternion::rotation_x(slow * -0.1 + slowa * 0.1);
|
||||
next.hand_r.scale = Vec3::one() + slow_abs * -0.05;
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
4.0 + skeleton_attr.foot.1,
|
||||
3.0 + skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(slow * 0.1 + stop * 1.2 + slow * 0.1);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.orientation = Quaternion::rotation_x(slow * 0.1 + stop * 1.2 + slow * 0.1);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
4.0 + skeleton_attr.foot.1,
|
||||
3.0 + skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(slowa * 0.1 + stop * 1.2 + slowa * 0.1);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.orientation = Quaternion::rotation_x(slowa * 0.1 + stop * 1.2 + slowa * 0.1);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_shoulder.scale = (Vec3::one() + slow_abs * -0.05) * 1.15;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_l.scale = (Vec3::one() + slow_abs * -0.05) * 1.15;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_shoulder.scale = (Vec3::one() + slow_abs * -0.05) * 1.15;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_r.scale = (Vec3::one() + slow_abs * -0.05) * 1.15;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -175,9 +175,9 @@ impl Animation for SitAnimation {
|
||||
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -93,21 +93,21 @@ impl Animation for SneakAnimation {
|
||||
next.hold.scale = Vec3::one() * 0.0;
|
||||
|
||||
if speed > 0.5 {
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
1.0 - skeleton_attr.hand.0,
|
||||
4.0 + skeleton_attr.hand.1,
|
||||
1.0 + skeleton_attr.hand.2,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.0);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.0);
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
-1.0 + skeleton_attr.hand.0,
|
||||
-1.0 + skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.4);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.4);
|
||||
next.hand_r.scale = Vec3::one();
|
||||
next.head.position = Vec3::new(
|
||||
0.0,
|
||||
-4.0 + skeleton_attr.head.0,
|
||||
@ -154,41 +154,41 @@ impl Animation for SneakAnimation {
|
||||
* Quaternion::rotation_x(0.3);
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothoril * -10.5 * walkintensity - lower * 1.0,
|
||||
1.0 + skeleton_attr.foot.2 + ((footvertl * -1.7).max(-1.0)) * walkintensity,
|
||||
);
|
||||
next.l_foot.orientation =
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(-0.2 + footrotl * -0.8 * walkintensity)
|
||||
* Quaternion::rotation_y(tilt * 1.8);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothorir * -10.5 * walkintensity - lower * 1.0,
|
||||
1.0 + skeleton_attr.foot.2 + ((footvertr * -1.7).max(-1.0)) * walkintensity,
|
||||
);
|
||||
next.r_foot.orientation =
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_x(-0.2 + footrotr * -0.8 * walkintensity)
|
||||
* Quaternion::rotation_y(tilt * 1.8);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(short * 0.15 * walkintensity);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(short * 0.15 * walkintensity);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(short * -0.15 * walkintensity);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(short * -0.15 * walkintensity);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.main.position = Vec3::new(-7.0, -6.5, 15.0);
|
||||
next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
@ -213,9 +213,9 @@ impl Animation for SneakAnimation {
|
||||
next.control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
} else {
|
||||
next.head.position = Vec3::new(
|
||||
0.0,
|
||||
@ -238,21 +238,21 @@ impl Animation for SneakAnimation {
|
||||
next.belt.orientation = Quaternion::rotation_z(0.3 + head_look.x * -0.1);
|
||||
next.belt.scale = Vec3::one() + breathe * -0.03;
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
1.0 - skeleton_attr.hand.0,
|
||||
5.0 + skeleton_attr.hand.1,
|
||||
0.0 + skeleton_attr.hand.2,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.35);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.35);
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
-1.0 + skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.4);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.4);
|
||||
next.hand_r.scale = Vec3::one();
|
||||
|
||||
next.glider.orientation = Quaternion::rotation_x(0.35);
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
@ -265,35 +265,35 @@ impl Animation for SneakAnimation {
|
||||
next.shorts.orientation = Quaternion::rotation_z(0.6 + head_look.x * -0.2);
|
||||
next.shorts.scale = Vec3::one() + breathe * -0.03;
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
-6.0 + skeleton_attr.foot.1,
|
||||
1.0 + skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(-0.5);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.5);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
4.0 + skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
next.shoulder_l.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
next.shoulder_r.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
|
||||
next.main.position = Vec3::new(-7.0, -5.0, 15.0);
|
||||
next.main.orientation = Quaternion::rotation_y(2.5) * Quaternion::rotation_z(1.57);
|
||||
@ -316,9 +316,9 @@ impl Animation for SneakAnimation {
|
||||
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
}
|
||||
next
|
||||
}
|
||||
|
@ -58,12 +58,12 @@ impl Animation for SpinAnimation {
|
||||
next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1);
|
||||
|
||||
if let Some(ToolKind::Sword(_)) = active_tool_kind {
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 2.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.1)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -130,12 +130,12 @@ impl Animation for SpinAnimation {
|
||||
if let Some(ToolKind::Axe(_) | ToolKind::Hammer(_) | ToolKind::Dagger(_)) = active_tool_kind
|
||||
{
|
||||
//INTENTION: SWORD
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.27);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.27);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 6.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -174,23 +174,23 @@ impl Animation for SpinAnimation {
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
|
||||
next.l_foot.position =
|
||||
next.foot_l.position =
|
||||
Vec3::new(-skeleton_attr.foot.0, foot * 1.0, skeleton_attr.foot.2);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(foot * -1.2);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.orientation = Quaternion::rotation_x(foot * -1.2);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position =
|
||||
next.foot_r.position =
|
||||
Vec3::new(skeleton_attr.foot.0, foot * -1.0, skeleton_attr.foot.2);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(foot * 1.2);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.orientation = Quaternion::rotation_x(foot * 1.2);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(-5.0, 0.0, 4.7);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.position = Vec3::new(-5.0, 0.0, 4.7);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(5.0, 0.0, 4.7);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.position = Vec3::new(5.0, 0.0, 4.7);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 5.0, 0.0);
|
||||
next.glider.orientation = Quaternion::rotation_y(0.0);
|
||||
@ -206,13 +206,13 @@ impl Animation for SpinAnimation {
|
||||
next.lantern.scale = Vec3::one() * 0.65;
|
||||
next.hold.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.l_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_control.orientation = Quaternion::rotation_x(0.0);
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(0.0);
|
||||
next.control_r.scale = Vec3::one();
|
||||
}
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -61,14 +61,14 @@ impl Animation for SpinMeleeAnimation {
|
||||
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Sword(_)) => {
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 2.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.1)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -102,18 +102,18 @@ impl Animation for SpinMeleeAnimation {
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(movement * 0.05);
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + movement * 4.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(movement * 0.2);
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_l.orientation = Quaternion::rotation_x(movement * 0.2);
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + movement * -12.0,
|
||||
skeleton_attr.foot.2 + movement * 1.0 + quick * 1.0,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(movement * -1.0)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(movement * -1.0)
|
||||
* Quaternion::rotation_z(movement * -0.8);
|
||||
},
|
||||
StageSection::Swing => {
|
||||
@ -149,16 +149,16 @@ impl Animation for SpinMeleeAnimation {
|
||||
}
|
||||
},
|
||||
Some(ToolKind::Axe(_)) => {
|
||||
next.l_hand.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(PI);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(-0.0, -2.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -204,49 +204,49 @@ impl Animation for SpinMeleeAnimation {
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
if velocity.z.abs() > 0.1 {
|
||||
next.l_foot.position =
|
||||
next.foot_l.position =
|
||||
Vec3::new(-skeleton_attr.foot.0, 8.0, skeleton_attr.foot.2 + 2.0);
|
||||
next.l_foot.orientation =
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(1.0) * Quaternion::rotation_z(0.0);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position =
|
||||
next.foot_r.position =
|
||||
Vec3::new(skeleton_attr.foot.0, 8.0, skeleton_attr.foot.2 + 2.0);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(1.0);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.orientation = Quaternion::rotation_x(1.0);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
} else if speed < 0.5 {
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
2.0 + quick * -6.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(0.5 + slowersmooth * 0.2)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.5 + slowersmooth * 0.2)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position =
|
||||
next.foot_r.position =
|
||||
Vec3::new(skeleton_attr.foot.0, 4.0, skeleton_attr.foot.2);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.5 - slowersmooth * 0.2)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.5 - slowersmooth * 0.2)
|
||||
* Quaternion::rotation_y(-0.4);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
} else {
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
2.0 + quick * -6.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(0.5 + slowersmooth * 0.2)
|
||||
next.foot_l.orientation = Quaternion::rotation_x(0.5 + slowersmooth * 0.2)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
2.0 + quick * 6.0,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(0.5 - slowersmooth * 0.2)
|
||||
next.foot_r.orientation = Quaternion::rotation_x(0.5 - slowersmooth * 0.2)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
};
|
||||
},
|
||||
_ => {},
|
||||
@ -263,8 +263,8 @@ impl Animation for SpinMeleeAnimation {
|
||||
next.hold.scale = Vec3::one() * 0.0;
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -78,52 +78,52 @@ impl Animation for StandAnimation {
|
||||
Quaternion::rotation_z(head_look.x * -0.2) * Quaternion::rotation_x(impact * -0.04);
|
||||
next.shorts.scale = Vec3::one() + breathe * -0.03;
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + slow * 0.15 - impact * 0.2,
|
||||
skeleton_attr.hand.2 + slow * 0.5 + impact * -0.1,
|
||||
);
|
||||
|
||||
next.l_hand.orientation = Quaternion::rotation_x(slow * -0.06 + impact * -0.1);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.orientation = Quaternion::rotation_x(slow * -0.06 + impact * -0.1);
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + slow * 0.15 - impact * 0.2,
|
||||
skeleton_attr.hand.2 + slow * 0.5 + impact * -0.1,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(slow * -0.06 + impact * -0.1);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.orientation = Quaternion::rotation_x(slow * -0.06 + impact * -0.1);
|
||||
next.hand_r.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 - impact * 0.15,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(impact * 0.02);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.orientation = Quaternion::rotation_x(impact * 0.02);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + impact * 0.15,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(impact * -0.02);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.orientation = Quaternion::rotation_x(impact * -0.02);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
next.shoulder_l.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
next.shoulder_r.scale = (Vec3::one() + breathe * -0.05) * 1.15;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -180,9 +180,9 @@ impl Animation for StandAnimation {
|
||||
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -129,57 +129,57 @@ impl Animation for SwimAnimation {
|
||||
* Quaternion::rotation_z(short * -0.3 * intensity);
|
||||
next.shorts.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(
|
||||
next.hand_l.position = Vec3::new(
|
||||
-1.0 - skeleton_attr.hand.0,
|
||||
1.5 + skeleton_attr.hand.1 - foot * 2.0 * intensity * squash,
|
||||
intensity * 5.0 + skeleton_attr.hand.2 + foot * -5.0 * intensity * squash,
|
||||
);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.5 + foot * -1.2 * intensity * squash)
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.5 + foot * -1.2 * intensity * squash)
|
||||
* Quaternion::rotation_y(0.4 + foot * -0.35);
|
||||
next.l_hand.scale = Vec3::one();
|
||||
next.hand_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
1.0 + skeleton_attr.hand.0,
|
||||
1.5 + skeleton_attr.hand.1 + foot * 2.0 * intensity * squash,
|
||||
intensity * 5.0 + skeleton_attr.hand.2 + foot * 5.0 * intensity * squash,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.5 + foot * 1.2 * intensity * squash)
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.5 + foot * 1.2 * intensity * squash)
|
||||
* Quaternion::rotation_y(-0.4 + foot * -0.35);
|
||||
next.r_hand.scale = Vec3::one();
|
||||
next.hand_r.scale = Vec3::one();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothoril * 1.5 * intensity * squash,
|
||||
-10.0 + skeleton_attr.foot.2 + footrotl * 3.0 * intensity * squash,
|
||||
);
|
||||
next.l_foot.orientation =
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(-0.8 * squash + footrotl * 0.4 * intensity * squash);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothorir * 1.5 * intensity * squash,
|
||||
-10.0 + skeleton_attr.foot.2 + footrotr * 3.0 * intensity * squash,
|
||||
);
|
||||
next.r_foot.orientation =
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_x(-0.8 * squash + footrotr * 0.4 * intensity * squash);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.l_shoulder.position = Vec3::new(
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.l_shoulder.orientation = Quaternion::rotation_x(short * 0.15 * intensity);
|
||||
next.l_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(short * 0.15 * intensity);
|
||||
next.shoulder_l.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.r_shoulder.position = Vec3::new(
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.r_shoulder.orientation = Quaternion::rotation_x(short * -0.15 * intensity);
|
||||
next.r_shoulder.scale = Vec3::one() * 1.1;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(short * -0.15 * intensity);
|
||||
next.shoulder_r.scale = Vec3::one() * 1.1;
|
||||
|
||||
next.glider.position = Vec3::new(0.0, 0.0, 10.0);
|
||||
next.glider.scale = Vec3::one() * 0.0;
|
||||
@ -245,9 +245,9 @@ impl Animation for SwimAnimation {
|
||||
|
||||
next.control.scale = Vec3::one(); //avgspeed*-0.14*reverse +
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -69,21 +69,21 @@ impl Animation for SwimWieldAnimation {
|
||||
let noisea = (anim_time as f32 * 11.0 + PI / 6.0).sin();
|
||||
let noiseb = (anim_time as f32 * 19.0 + PI / 4.0).sin();
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothoril * 1.5 * intensity,
|
||||
-10.0 + skeleton_attr.foot.2 + footrotl * 3.0 * intensity,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(-0.8 + footrotl * 0.4 * intensity);
|
||||
next.l_foot.scale = Vec3::one();
|
||||
next.foot_l.orientation = Quaternion::rotation_x(-0.8 + footrotl * 0.4 * intensity);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothorir * 1.5 * intensity,
|
||||
-10.0 + skeleton_attr.foot.2 + footrotr * 3.0 * intensity,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(-0.8 + footrotr * 0.4 * intensity);
|
||||
next.r_foot.scale = Vec3::one();
|
||||
next.foot_r.orientation = Quaternion::rotation_x(-0.8 + footrotr * 0.4 * intensity);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.hold.scale = Vec3::one() * 0.0;
|
||||
|
||||
@ -115,13 +115,13 @@ impl Animation for SwimWieldAnimation {
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.0) * skeleton_attr.scaler;
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
-2.0 + skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
2.0 + skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
@ -144,14 +144,14 @@ impl Animation for SwimWieldAnimation {
|
||||
match active_tool_kind {
|
||||
//TODO: Inventory
|
||||
Some(ToolKind::Sword(_)) => {
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, -2.5);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -5.5);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, -3.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.1)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -174,28 +174,28 @@ impl Animation for SwimWieldAnimation {
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.control.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.l_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_l.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
|
||||
next.l_control.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.l_control.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
next.control_l.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.control_l.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
// * Quaternion::rotation_y(0.0)
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.l_control.scale = Vec3::one();
|
||||
// next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.r_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_r.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
@ -203,11 +203,11 @@ impl Animation for SwimWieldAnimation {
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.second.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
// next.r_control.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.control_r.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
// next.control_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
// * Quaternion::rotation_y(0.0 * PI)
|
||||
// * Quaternion::rotation_z(0.0 * PI);
|
||||
// next.r_control.scale = Vec3::one();
|
||||
// next.control_r.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Axe(_)) => {
|
||||
if velocity < 0.5 {
|
||||
@ -241,16 +241,16 @@ impl Animation for SwimWieldAnimation {
|
||||
* Quaternion::rotation_z(PI - 0.2);
|
||||
next.control.scale = Vec3::one();
|
||||
}
|
||||
next.l_hand.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(-0.0, -2.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -259,13 +259,13 @@ impl Animation for SwimWieldAnimation {
|
||||
next.control.position = Vec3::new(-3.0, 11.0, 3.0);
|
||||
},
|
||||
Some(ToolKind::Hammer(_)) => {
|
||||
next.l_hand.position = Vec3::new(-12.0, 0.0, 0.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(-12.0, 0.0, 0.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(-0.0) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(2.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(2.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(-1.57)
|
||||
@ -278,15 +278,15 @@ impl Animation for SwimWieldAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
next.l_hand.position = Vec3::new(1.5, 0.5, -4.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(1.5, 0.5, -4.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(8.0, 4.0, 2.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.8)
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(8.0, 4.0, 2.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.8)
|
||||
* Quaternion::rotation_y(0.5)
|
||||
* Quaternion::rotation_z(-0.27);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(12.0, 8.4, 13.2);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(3.14 + 0.3)
|
||||
@ -309,28 +309,28 @@ impl Animation for SwimWieldAnimation {
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.control.scale = Vec3::one();
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.l_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_l.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
|
||||
next.l_control.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.l_control.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
next.control_l.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
// next.control_l.orientation = Quaternion::rotation_x(u_slow * 0.15 + 1.0)
|
||||
// * Quaternion::rotation_y(0.0)
|
||||
// * Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
// next.l_control.scale = Vec3::one();
|
||||
// next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.r_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_r.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
@ -338,23 +338,23 @@ impl Animation for SwimWieldAnimation {
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.second.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
// next.r_control.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.control_r.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
// next.control_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
// * Quaternion::rotation_y(0.0 * PI)
|
||||
// * Quaternion::rotation_z(0.0 * PI);
|
||||
// next.r_control.scale = Vec3::one();
|
||||
// next.control_r.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Bow(_)) => {
|
||||
next.l_hand.position = Vec3::new(2.0, 1.5, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.position = Vec3::new(2.0, 1.5, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(5.9, 4.5, -5.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(5.9, 4.5, -5.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(3.0, 2.0, -13.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.3)
|
||||
@ -372,16 +372,16 @@ impl Animation for SwimWieldAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Debug(_)) => {
|
||||
next.l_hand.position = Vec3::new(-7.0, 4.0, 3.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27)
|
||||
next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.r_hand.position = Vec3::new(7.0, 2.5, -1.25);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.27)
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.position = Vec3::new(7.0, 2.5, -1.25);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.27)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_r.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(5.0, 8.75, -2.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(-1.27)
|
||||
@ -398,15 +398,15 @@ impl Animation for SwimWieldAnimation {
|
||||
* Quaternion::rotation_x(-0.2 + head_look.y.abs());
|
||||
next.head.scale = Vec3::one() * skeleton_attr.head_scale;
|
||||
}
|
||||
next.l_hand.position = Vec3::new(9.0, 1.0, 1.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(9.0, 1.0, 1.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.57) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(9.0, 1.0, 11.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.57)
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(9.0, 1.0, 11.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.57)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(7.5, 7.5, 13.2);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(3.14)
|
||||
@ -421,9 +421,9 @@ impl Animation for SwimWieldAnimation {
|
||||
_ => {},
|
||||
}
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
@ -89,19 +89,19 @@ impl Animation for WieldAnimation {
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.0) * skeleton_attr.scaler;
|
||||
next.torso.scale = Vec3::one() / 11.0 * skeleton_attr.scaler;
|
||||
|
||||
next.l_foot.position = Vec3::new(
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
-2.0 + skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.l_foot.orientation = Quaternion::rotation_x(u_slowalt * 0.035 - 0.2);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(u_slowalt * 0.035 - 0.2);
|
||||
|
||||
next.r_foot.position = Vec3::new(
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
2.0 + skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.r_foot.orientation = Quaternion::rotation_x(u_slow * 0.035);
|
||||
next.foot_r.orientation = Quaternion::rotation_x(u_slow * 0.035);
|
||||
|
||||
next.chest.orientation =
|
||||
Quaternion::rotation_y(u_slowalt * 0.04) * Quaternion::rotation_z(0.15);
|
||||
@ -120,14 +120,14 @@ impl Animation for WieldAnimation {
|
||||
match active_tool_kind {
|
||||
//TODO: Inventory
|
||||
Some(ToolKind::Sword(_)) => {
|
||||
next.l_hand.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
next.l_hand.scale = Vec3::one() * 1.04;
|
||||
next.r_hand.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.r_hand.orientation =
|
||||
next.hand_l.scale = Vec3::one() * 1.04;
|
||||
next.hand_r.position = Vec3::new(0.75, -1.5, -0.5);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.47) * Quaternion::rotation_y(0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, -3.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.1);
|
||||
|
||||
@ -143,24 +143,24 @@ impl Animation for WieldAnimation {
|
||||
|
||||
next.control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.l_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_l.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
|
||||
next.l_control.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
next.control_l.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.r_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_r.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
@ -168,7 +168,7 @@ impl Animation for WieldAnimation {
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.second.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
next.control_r.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
},
|
||||
Some(ToolKind::Axe(_)) => {
|
||||
if speed < 0.5 {
|
||||
@ -202,16 +202,16 @@ impl Animation for WieldAnimation {
|
||||
* Quaternion::rotation_z(PI - 0.2);
|
||||
next.control.scale = Vec3::one();
|
||||
}
|
||||
next.l_hand.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.position = Vec3::new(-0.5, 0.0, 4.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(0.5, 0.0, -2.5);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_y(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(-0.0, -2.0, -1.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
@ -220,13 +220,13 @@ impl Animation for WieldAnimation {
|
||||
next.control.position = Vec3::new(-3.0, 11.0, 3.0);
|
||||
},
|
||||
Some(ToolKind::Hammer(_)) => {
|
||||
next.l_hand.position = Vec3::new(-12.0, 0.0, 0.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(-12.0, 0.0, 0.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(-0.0) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.08;
|
||||
next.r_hand.position = Vec3::new(2.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.r_hand.scale = Vec3::one() * 1.06;
|
||||
next.hand_l.scale = Vec3::one() * 1.08;
|
||||
next.hand_r.position = Vec3::new(2.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.06;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(-1.57) * Quaternion::rotation_z(1.57);
|
||||
@ -238,27 +238,28 @@ impl Animation for WieldAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Staff(_)) | Some(ToolKind::Sceptre(_)) => {
|
||||
<<<<<<< HEAD
|
||||
if speed > 0.5 && velocity.z == 0.0 {
|
||||
next.r_hand.position = Vec3::new(
|
||||
next.hand_r.position = Vec3::new(
|
||||
4.0 + skeleton_attr.hand.0 + foothoril * 1.3,
|
||||
-2.0 + skeleton_attr.hand.1 + foothoril * -6.5,
|
||||
-2.0 + skeleton_attr.hand.2 - foothoril * 7.0,
|
||||
);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.6 + footrotl * -1.2)
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.6 + footrotl * -1.2)
|
||||
* Quaternion::rotation_y(footrotl * -0.4);
|
||||
} else {
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 2.0);
|
||||
next.r_hand.orientation =
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 2.0);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(1.57) * Quaternion::rotation_y(0.2);
|
||||
};
|
||||
next.control.position = Vec3::new(-4.0, 7.0, 4.0);
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, -4.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, -4.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.27) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(0.0, 0.0, 13.2);
|
||||
next.main.orientation = Quaternion::rotation_y(3.14);
|
||||
|
||||
@ -274,38 +275,38 @@ impl Animation for WieldAnimation {
|
||||
|
||||
next.control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
|
||||
next.l_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(0.0 * PI);
|
||||
next.l_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_l.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.0 * PI);
|
||||
next.hand_l.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.0 * PI);
|
||||
|
||||
next.l_control.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
next.control_l.position = Vec3::new(-7.0, 0.0, 0.0);
|
||||
|
||||
next.r_hand.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
next.hand_r.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.0 * PI)
|
||||
* Quaternion::rotation_y(0.0 * PI)
|
||||
* Quaternion::rotation_z(0.0 * PI);
|
||||
next.r_hand.scale = Vec3::one() * hand_scale;
|
||||
next.hand_r.scale = Vec3::one() * hand_scale;
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(0.0 * PI);
|
||||
next.second.scale = Vec3::one();
|
||||
|
||||
next.r_control.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
next.control_r.position = Vec3::new(7.0, 0.0, 0.0);
|
||||
},
|
||||
Some(ToolKind::Bow(_)) => {
|
||||
next.l_hand.position = Vec3::new(2.0, 1.5, 0.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.position = Vec3::new(2.0, 1.5, 0.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(5.9, 4.5, -5.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.20)
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(5.9, 4.5, -5.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.20)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(-0.3);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(3.0, 2.0, -13.0);
|
||||
next.main.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(0.3)
|
||||
@ -323,11 +324,11 @@ impl Animation for WieldAnimation {
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::Debug(_)) => {
|
||||
next.l_hand.position = Vec3::new(-7.0, 4.0, 3.0);
|
||||
next.l_hand.orientation = Quaternion::rotation_x(1.27)
|
||||
next.hand_l.position = Vec3::new(-7.0, 4.0, 3.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.27)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.01;
|
||||
next.hand_l.scale = Vec3::one() * 1.01;
|
||||
next.main.position = Vec3::new(-5.0, 5.0, 23.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0)
|
||||
* Quaternion::rotation_x(PI)
|
||||
@ -343,13 +344,13 @@ impl Animation for WieldAnimation {
|
||||
* Quaternion::rotation_x(-0.2 + head_look.y.abs());
|
||||
next.head.scale = Vec3::one() * skeleton_attr.head_scale;
|
||||
}
|
||||
next.l_hand.position = Vec3::new(9.0, 1.0, 1.0);
|
||||
next.l_hand.orientation =
|
||||
next.hand_l.position = Vec3::new(9.0, 1.0, 1.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(1.57) * Quaternion::rotation_y(0.0);
|
||||
next.l_hand.scale = Vec3::one() * 1.05;
|
||||
next.r_hand.position = Vec3::new(9.0, 1.0, 11.0);
|
||||
next.r_hand.orientation = Quaternion::rotation_x(1.57);
|
||||
next.r_hand.scale = Vec3::one() * 1.05;
|
||||
next.hand_l.scale = Vec3::one() * 1.05;
|
||||
next.hand_r.position = Vec3::new(9.0, 1.0, 11.0);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.57);
|
||||
next.hand_r.scale = Vec3::one() * 1.05;
|
||||
next.main.position = Vec3::new(7.5, 7.5, 13.2);
|
||||
next.main.orientation = Quaternion::rotation_y(3.14);
|
||||
|
||||
@ -362,9 +363,9 @@ impl Animation for WieldAnimation {
|
||||
_ => {},
|
||||
}
|
||||
|
||||
next.l_control.scale = Vec3::one();
|
||||
next.control_l.scale = Vec3::one();
|
||||
|
||||
next.r_control.scale = Vec3::one();
|
||||
next.control_r.scale = Vec3::one();
|
||||
|
||||
next.second.scale = match (
|
||||
active_tool_kind.map(|tk| tk.hands()),
|
||||
|
Loading…
Reference in New Issue
Block a user