bipedlarge hammer fixes

This commit is contained in:
jshipsey 2020-10-18 14:31:40 -04:00 committed by Robin Gilh
parent 64d73abdec
commit 9c003cf572
2 changed files with 35 additions and 16 deletions

View File

@ -211,8 +211,8 @@ impl Animation for AlphaAnimation {
next.foot_l.position = Vec3::new(
-skeleton_attr.foot.0,
slow * -3.0 + quick * 3.0 - 4.0,
skeleton_attr.foot.2,
skeleton_attr.foot.1 + slow * -3.0 + quick * 3.0 - 4.0,
skeleton_attr.foot.2 + skeleton_attr.foot.2,
);
next.foot_l.orientation = Quaternion::rotation_x(slow * 0.6)
* Quaternion::rotation_y((slow * -0.2).max(0.0));
@ -220,8 +220,8 @@ impl Animation for AlphaAnimation {
next.foot_r.position = Vec3::new(
skeleton_attr.foot.0,
slow * 3.0 + quick * -3.0 + 5.0,
skeleton_attr.foot.2,
skeleton_attr.foot.1 + slow * 3.0 + quick * -3.0 + 5.0,
skeleton_attr.foot.2 + skeleton_attr.foot.2,
);
next.foot_r.orientation = Quaternion::rotation_x(slow * -0.6)
* Quaternion::rotation_y((slow * 0.2).min(0.0));
@ -241,11 +241,19 @@ impl Animation for AlphaAnimation {
* Quaternion::rotation_y(0.2);
next.head.scale = Vec3::one() * 1.01;
next.upper_torso.position = Vec3::new(0.0, 0.0, 7.0);
next.upper_torso.position = Vec3::new(
0.0,
skeleton_attr.upper_torso.0,
skeleton_attr.upper_torso.1,
);
next.upper_torso.orientation = Quaternion::rotation_z(0.2 + axe * 0.2);
next.upper_torso.scale = Vec3::one();
next.lower_torso.position = Vec3::new(0.0, 0.0, -5.0);
next.lower_torso.position = Vec3::new(
0.0,
skeleton_attr.lower_torso.0,
skeleton_attr.lower_torso.1,
);
next.lower_torso.orientation = Quaternion::rotation_z(0.2 + axe * -0.2);
next.hand_l.position = Vec3::new(-0.5, 0.0, 4.0);
@ -302,7 +310,7 @@ impl Animation for AlphaAnimation {
next.head.position =
Vec3::new(0.0, -2.0 + skeleton_attr.head.0, skeleton_attr.head.1);
next.head.orientation = Quaternion::rotation_z(slower * 0.03)
* Quaternion::rotation_x(slowersmooth * 0.1)
* Quaternion::rotation_x(-0.3 + slowersmooth * 0.1)
* Quaternion::rotation_y(slower * 0.05 + slowersmooth * 0.06)
* Quaternion::rotation_z((slowersmooth * -0.4).max(0.0));
next.head.scale = Vec3::one() * 1.01;
@ -317,7 +325,11 @@ impl Animation for AlphaAnimation {
* Quaternion::rotation_x(0.0 + slower * 0.18 + slowersmooth * 0.15)
* Quaternion::rotation_y(0.0);
next.lower_torso.position = Vec3::new(0.0, 0.0, -5.0);
next.lower_torso.position = Vec3::new(
0.0,
skeleton_attr.lower_torso.0,
skeleton_attr.lower_torso.1,
);
next.lower_torso.orientation =
Quaternion::rotation_z(slower * -0.1 + slowersmooth * -0.075)
* Quaternion::rotation_x(0.0 + slower * -0.1)

View File

@ -446,8 +446,11 @@ impl Animation for WieldAnimation {
next.hand_r.orientation =
Quaternion::rotation_x(0.57) * Quaternion::rotation_z(1.57);
next.hand_r.scale = Vec3::one() * 1.02;
next.hand_r.orientation =
Quaternion::rotation_x(0.57) * Quaternion::rotation_z(1.57);
next.hand_r.scale = Vec3::one() * 1.02;
next.control.position = Vec3::new(0.0, 0.0, 0.0);
next.control.position = Vec3::new(7.0, 9.0, -10.0);
next.control.orientation = Quaternion::rotation_x(test * 0.02)
* Quaternion::rotation_y(test * 0.02)
* Quaternion::rotation_z(test * 0.02);
@ -455,7 +458,7 @@ impl Animation for WieldAnimation {
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(1.57)
* Quaternion::rotation_y(-1.57)
* Quaternion::rotation_z(1.0);
next.main.scale = Vec3::one() * 1.02;
},
@ -497,12 +500,13 @@ impl Animation for WieldAnimation {
next.control.scale = Vec3::one();
},
Some(ToolKind::NpcWeapon(_)) => {
/*next.shoulder_l.position = Vec3::new(
next.shoulder_l.position = Vec3::new(
-skeleton_attr.shoulder.0,
skeleton_attr.shoulder.1,
skeleton_attr.shoulder.2,
);
next.shoulder_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(breathe);
next.shoulder_l.orientation =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(breathe);
next.shoulder_l.scale = Vec3::one() + breathe;
next.shoulder_r.position = Vec3::new(
@ -510,7 +514,8 @@ impl Animation for WieldAnimation {
skeleton_attr.shoulder.1,
skeleton_attr.shoulder.2,
);
next.shoulder_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(breathe);
next.shoulder_r.orientation =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(breathe);
next.shoulder_r.scale = Vec3::one() + breathe;
next.hand_l.position = Vec3::new(
@ -518,7 +523,8 @@ impl Animation for WieldAnimation {
skeleton_attr.hand.1,
skeleton_attr.hand.2 + torso * 0.6,
);
next.hand_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
next.hand_l.orientation =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
next.hand_l.scale = Vec3::one() * 1.02;
next.hand_r.position = Vec3::new(
@ -526,12 +532,13 @@ impl Animation for WieldAnimation {
skeleton_attr.hand.1,
skeleton_attr.hand.2 + torso * 0.6,
);
next.hand_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
next.hand_r.orientation =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
next.hand_r.scale = Vec3::one() * 1.02;
next.control.position = Vec3::new(0.0, 0.0, 0.0);
next.control.orientation = Quaternion::rotation_z(0.0);
next.control.scale = Vec3::one();*/
next.control.scale = Vec3::one();
if velocity < 0.5 {
next.head.position = Vec3::new(
0.0,