From 4eb0e8cd36af76f4696502cdf9fd45726c4b338d Mon Sep 17 00:00:00 2001 From: uniior Date: Sun, 3 Mar 2024 13:24:08 -0300 Subject: [PATCH] Feint draft + tweaks "Rebase" --- voxygen/anim/src/character/multi.rs | 66 ++++++++++++++++++----------- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/voxygen/anim/src/character/multi.rs b/voxygen/anim/src/character/multi.rs index cf7ac2b569..9e0de68ade 100644 --- a/voxygen/anim/src/character/multi.rs +++ b/voxygen/anim/src/character/multi.rs @@ -100,7 +100,7 @@ impl Animation for MultiAction { next.head.orientation = Quaternion::rotation_x(move1 * 0.2 + move2alt * -0.24) * Quaternion::rotation_y(move1 * 0.3 + move2alt * -0.36) - * Quaternion::rotation_z(move1 * -0.6 + move2alt * 0.72); + * Quaternion::rotation_z(move1 * -0.3 + move2alt * 0.72); next.belt.orientation = Quaternion::rotation_z(move1 * -0.8 + move2alt * 1.0); next.shorts.orientation = @@ -153,12 +153,12 @@ impl Animation for MultiAction { next.control.orientation = Quaternion::rotation_x(s_a.sc.3); next.chest.orientation = - Quaternion::rotation_y(move1 * 0.2 + move2 * -0.2) - * Quaternion::rotation_z(move1 * 0.6 + move2 * -1.0); + Quaternion::rotation_y(move1 * 0.1 + move2 * -0.15) + * Quaternion::rotation_z(move1 * 1.2 + move2 * -2.0); next.head.orientation = Quaternion::rotation_x(move1 * 0.2 + move2 * -0.24) * Quaternion::rotation_y(move1 * 0.3 + move2 * -0.36) - * Quaternion::rotation_z(move1 * -0.6 + move2 * 0.72); + * Quaternion::rotation_z(move1 * -0.3 + move2 * 0.72); next.control.orientation.rotate_x(move1 * 1.2); next.control.position += Vec3::new(move1 * -4.0, 0.0, move1 * 6.0); next.control.orientation.rotate_y(move1 * -1.6); @@ -231,19 +231,18 @@ impl Animation for MultiAction { next.chest.position += Vec3::new(0.0, move1 * -0.5, 0.0); next.chest.orientation = Quaternion::rotation_z(move1 * 1.0); next.head.orientation = - Quaternion::rotation_y(move1 * -0.4) - * Quaternion::rotation_z(move1 * -0.7); + Quaternion::rotation_y(move1 * 0.2 + move2 * -0.24) + * Quaternion::rotation_z(move1 * 0.3 + move2 * -0.36) + * Quaternion::rotation_z(move1 * -0.3 + move2 * 0.72); next.belt.orientation = Quaternion::rotation_z(move1 * -0.2); next.shorts.orientation = Quaternion::rotation_z(move1 * -0.5); next.control.position += Vec3::new(move1 * -8.0, 0.0, move1 * 5.0); next.chest.position += Vec3::new(0.0, move2 * 6.0, 0.0); next.chest.orientation.rotate_z(move2 * -2.4); - next.head.orientation.rotate_y(move2 * 0.6); - next.head.orientation.rotate_z(move2 * 1.4); next.belt.orientation.rotate_z(move2 * 0.8); next.shorts.orientation.rotate_z(move2 * 1.5); - next.control.orientation.rotate_z(move2 * -3.5); + next.control.orientation.rotate_z(move2 * -3.8); next.control.position += Vec3::new(move2 * 9.0, move2 * 4.0, 0.0); }, Some("common.abilities.sword.agile_feint") => { @@ -258,34 +257,53 @@ impl Animation for MultiAction { next.hand_r.orientation = Quaternion::rotation_x(0.9 + move1 * 0.5); next.control.position = Vec3::new(s_a.sc.0, s_a.sc.1, s_a.sc.2); next.control.orientation = Quaternion::rotation_x(s_a.sc.3); + next.foot_l.position = Vec3::new(-s_a.foot.0, s_a.foot.1, s_a.foot.2); + next.foot_r.position = Vec3::new(s_a.foot.0, s_a.foot.1, s_a.foot.2); next.control.position += Vec3::new(0.0, 0.0, move1 * 4.0); // Right feint if x < 0, else left - if d.move_dir.x < 0.0 { - next.chest.orientation = Quaternion::rotation_z(move1 * -0.5); - next.head.orientation = Quaternion::rotation_z(move1 * 0.3); + if move_dir.x < 0.0 { + next.chest.orientation = + Quaternion::rotation_y(move1 * 0.1 + move2 * -0.15) + * Quaternion::rotation_z(move1 * 1.2 + move2 * -2.0); + next.chest.position += Vec3::new(0.0, move1 * -0.5, 0.0); + next.head.orientation = + Quaternion::rotation_x(move1 * 0.2 + move2 * -0.24) + * Quaternion::rotation_y(move1 * 0.3 + move2 * -0.36) + * Quaternion::rotation_z(move1 * -0.3 + move2 * 0.72); next.shorts.orientation = Quaternion::rotation_z(move1 * 0.4); next.belt.orientation = Quaternion::rotation_z(move1 * 0.2); - next.control.position += Vec3::new(move1 * 12.0, 0.0, 0.0); - next.control.orientation.rotate_y(move1 * 1.5); + next.control.position += Vec3::new(move1 * 12.0, 6.0, 0.0); + next.control.orientation = + Quaternion::rotation_x(move1 * 0.2) + * Quaternion::rotation_y(move1 * -1.7) + * Quaternion::rotation_z(move1 * 0.7); - next.chest.orientation.rotate_z(move2 * -0.4); - next.head.orientation.rotate_z(move2 * 0.2); + next.chest.position += Vec3::new(0.0, move2 * 6.0, 0.0); next.belt.orientation.rotate_z(move2 * 0.1); - next.control.orientation.rotate_z(move2 * -0.4); + next.control.orientation.rotate_z(move2 * -1.9); next.control.position += Vec3::new(move2 * 5.0, move2 * 2.0, 0.0); } else { - next.chest.orientation = Quaternion::rotation_z(move1 * 0.5); - next.head.orientation = Quaternion::rotation_z(move1 * -0.3); + next.chest.orientation = + Quaternion::rotation_y(move1 * -0.1 + move2 * 0.15) + * Quaternion::rotation_z(move1 * -1.2 + move2 * 2.0); + next.chest.position += Vec3::new(0.0, move1 * -0.5, 0.0); + next.head.orientation = + Quaternion::rotation_y(move1 * -0.2 + move2 * 0.24) + * Quaternion::rotation_z(move1 * -0.3 + move2 * 0.36) + * Quaternion::rotation_z(move1 * 0.3 + move2 * -0.72); next.shorts.orientation = Quaternion::rotation_z(move1 * -0.4); next.belt.orientation = Quaternion::rotation_z(move1 * -0.2); - next.control.orientation.rotate_y(move1 * -1.5); - - next.chest.orientation.rotate_z(move2 * 0.4); - next.head.orientation.rotate_z(move2 * -0.2); + next.control.position += Vec3::new(move1 * -6.0, 6.0, 0.0); + next.control.orientation = + Quaternion::rotation_x(move1 * 0.2) + * Quaternion::rotation_y(move1 * 1.7) + * Quaternion::rotation_z(move1 * -0.7); + + next.chest.position += Vec3::new(0.0, move2 * 6.0, 0.0); next.belt.orientation.rotate_z(move2 * -0.1); - next.control.orientation.rotate_z(move2 * 0.4); + next.control.orientation.rotate_z(move2 * 1.9); next.control.position += Vec3::new(move2 * -5.0, move2 * 2.0, 0.0); } },