added bow wielding animations

This commit is contained in:
jshipsey 2019-09-30 14:16:27 -04:00 committed by timokoesters
parent d876215012
commit 66e8f4c4bc
No known key found for this signature in database
GPG Key ID: CD80BE9AAEE78097
3 changed files with 58 additions and 38 deletions

View File

@ -62,7 +62,7 @@ impl Animation for CidleAnimation {
next.shorts.ori = Quaternion::rotation_x(0.0);
next.shorts.scale = Vec3::one();
match Tool::Hammer {
match Tool::Bow {
//TODO: Inventory
Tool::Sword => {
next.l_hand.offset = Vec3::new(
@ -187,27 +187,31 @@ impl Animation for CidleAnimation {
}
Tool::Bow => {
next.l_hand.offset = Vec3::new(
-6.0 + wave_ultra_slow_cos * 1.0,
3.5 + wave_ultra_slow_cos * 0.5,
-4.0 + wave_ultra_slow_cos * 1.0,
5.0 + wave_ultra_slow_cos * 0.5,
0.0 + wave_ultra_slow * 1.0,
);
next.l_hand.ori = Quaternion::rotation_x(-0.3);
next.l_hand.ori = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-1.9)
* Quaternion::rotation_z(0.85);
next.l_hand.scale = Vec3::one() * 1.01;
next.r_hand.offset = 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,
2.0 + wave_ultra_slow_cos * 1.0,
8.0 + wave_ultra_slow_cos * 0.5,
-3.5 + wave_ultra_slow * 1.0,
);
next.r_hand.ori = Quaternion::rotation_x(-0.3);
next.r_hand.ori = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-1.7)
* Quaternion::rotation_z(0.85);
next.r_hand.scale = Vec3::one() * 1.01;
next.weapon.offset = Vec3::new(
-6.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
4.5 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
0.0 + wave_ultra_slow * 1.0,
9.0 + skeleton_attr.weapon_x + wave_ultra_slow_cos * 1.0,
10.0 + skeleton_attr.weapon_y + wave_ultra_slow_cos * 0.5,
-3.0 + wave_ultra_slow * 1.0,
);
next.weapon.ori = Quaternion::rotation_x(-0.3)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.weapon.ori = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-1.7)
* Quaternion::rotation_z(0.85);
next.weapon.scale = Vec3::one();
}
Tool::Daggers => {

View File

@ -41,7 +41,7 @@ impl Animation for WieldAnimation {
* 0.1,
);
match Tool::Hammer {
match Tool::Bow {
//TODO: Inventory
Tool::Sword => {
next.l_hand.offset = Vec3::new(-6.0, 3.75, 0.25);
@ -133,20 +133,32 @@ impl Animation for WieldAnimation {
next.weapon.scale = Vec3::one();
}
Tool::Bow => {
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
next.l_hand.ori = Quaternion::rotation_x(-0.3);
next.l_hand.scale = Vec3::one() * 1.01;
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
next.r_hand.ori = Quaternion::rotation_x(-0.3);
next.r_hand.scale = Vec3::one() * 1.01;
next.weapon.offset = Vec3::new(
-6.0 + skeleton_attr.weapon_x,
4.5 + skeleton_attr.weapon_y,
next.l_hand.offset = Vec3::new(
-4.0,
5.0,
0.0,
);
next.weapon.ori = Quaternion::rotation_x(-0.3)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.l_hand.ori = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-1.9)
* Quaternion::rotation_z(0.85);
next.l_hand.scale = Vec3::one() * 1.01;
next.r_hand.offset = Vec3::new(
2.0,
8.0,
-3.5,
);
next.r_hand.ori = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-1.7)
* Quaternion::rotation_z(0.85);
next.r_hand.scale = Vec3::one() * 1.01;
next.weapon.offset = Vec3::new(
9.0 + skeleton_attr.weapon_x,
10.0 + skeleton_attr.weapon_y,
-3.0,
);
next.weapon.ori = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-1.7)
* Quaternion::rotation_z(0.85+3.14);
next.weapon.scale = Vec3::one();
}
Tool::Daggers => {

View File

@ -22,7 +22,7 @@ impl Animation for WieldAnimation {
let wave = (anim_time as f32 * 12.0).sin();
match Tool::Hammer {
match Tool::Bow {
//TODO: Inventory
Tool::Sword => {
next.l_hand.offset = Vec3::new(-6.0, 3.75, 0.25);
@ -114,20 +114,24 @@ impl Animation for WieldAnimation {
next.weapon.scale = Vec3::one();
}
Tool::Bow => {
next.l_hand.offset = Vec3::new(-6.0, 3.5, 0.0);
next.l_hand.ori = Quaternion::rotation_x(-0.3);
next.l_hand.offset = Vec3::new(-4.0, 5.0, 0.0);
next.l_hand.ori = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-1.9)
* Quaternion::rotation_z(0.85);
next.l_hand.scale = Vec3::one() * 1.01;
next.r_hand.offset = Vec3::new(-6.0, 3.0, -2.0);
next.r_hand.ori = Quaternion::rotation_x(-0.3);
next.r_hand.offset = Vec3::new(2.0, 8.0, -3.5);
next.r_hand.ori = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-1.7)
* Quaternion::rotation_z(0.85);
next.r_hand.scale = Vec3::one() * 1.01;
next.weapon.offset = Vec3::new(
-6.0 + skeleton_attr.weapon_x,
4.5 + skeleton_attr.weapon_y,
0.0,
9.0 + skeleton_attr.weapon_x,
10.0 + skeleton_attr.weapon_y,
-3.0,
);
next.weapon.ori = Quaternion::rotation_x(-0.3)
* Quaternion::rotation_y(0.0)
* Quaternion::rotation_z(0.0);
next.weapon.ori = Quaternion::rotation_x(0.0)
* Quaternion::rotation_y(-1.7)
* Quaternion::rotation_z(0.85);
next.weapon.scale = Vec3::one();
}
Tool::Daggers => {