mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added animations for recover section of all abilities
This commit is contained in:
parent
a8212d6f41
commit
ac2e2fd724
@ -3,7 +3,7 @@ ComboMelee2(
|
||||
(
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 7,
|
||||
damage: 12,
|
||||
poise: 0,
|
||||
knockback: 0,
|
||||
energy_regen: 10,
|
||||
@ -20,7 +20,7 @@ ComboMelee2(
|
||||
),
|
||||
],
|
||||
is_stance: false,
|
||||
energy_cost_per_strike: 20,
|
||||
energy_cost_per_strike: 10,
|
||||
meta: (
|
||||
kind: Some(Sword(Cleaving)),
|
||||
),
|
||||
|
@ -26,7 +26,7 @@ impl Animation for BetaAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_beta")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, ability_id, _velocity, _global_time, stage_section, ability_info): Self::Dependency<
|
||||
(hands, _ability_id, _velocity, _global_time, stage_section, ability_info): Self::Dependency<
|
||||
'a,
|
||||
>,
|
||||
anim_time: f32,
|
||||
|
@ -37,6 +37,7 @@ impl Animation for ChargeswingAnimation {
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0);
|
||||
next.main_weapon_trail = true;
|
||||
|
||||
match ability_id {
|
||||
Some("common.abilities.sword.balanced_thrust") => {
|
||||
@ -51,6 +52,9 @@ impl Animation for ChargeswingAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 0.0),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
|
@ -3,7 +3,7 @@ use super::{
|
||||
CharacterSkeleton, SkeletonAttr,
|
||||
};
|
||||
use common::{
|
||||
comp::item::{Hands, ToolKind},
|
||||
comp::item::Hands,
|
||||
states::utils::{AbilityInfo, StageSection},
|
||||
};
|
||||
use core::f32::consts::PI;
|
||||
@ -26,35 +26,42 @@ impl Animation for ComboAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_combo")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, ability_id, stage_section, ability_info, current_strike, move_dir): Self::Dependency<'a>,
|
||||
(_hands, ability_id, stage_section, _ability_info, current_strike, move_dir): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
) -> Self::Skeleton {
|
||||
*rate = 1.0;
|
||||
let mut next = (*skeleton).clone();
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0);
|
||||
next.main_weapon_trail = true;
|
||||
let multi_strike_pullback = 1.0
|
||||
- if matches!(stage_section, Some(StageSection::Recover)) {
|
||||
anim_time.powi(4)
|
||||
} else {
|
||||
0.0
|
||||
};
|
||||
|
||||
for strike in 0..=current_strike {
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0);
|
||||
match ability_id {
|
||||
Some("common.abilities.sword.balanced_combo") => {
|
||||
next.main_weapon_trail = true;
|
||||
next.off_weapon_trail = true;
|
||||
let (move1, move2, move3, move2alt) = if strike == current_strike {
|
||||
let (move1, move2, move2alt) = if strike == current_strike {
|
||||
match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => {
|
||||
(1.0, anim_time.powi(2), 0.0, anim_time.powf(0.25))
|
||||
(1.0, anim_time.powi(2), anim_time.powf(0.25))
|
||||
},
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 1.0),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, 1.0),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
}
|
||||
} else {
|
||||
(1.0, 1.0, 0.0, 1.0)
|
||||
(1.0, 1.0, 1.0)
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move2 = move2 * pullback;
|
||||
let move2alt = move2alt * pullback;
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
let move2alt = move2alt * multi_strike_pullback;
|
||||
|
||||
match strike {
|
||||
0 => {
|
||||
@ -100,22 +107,18 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.offensive_combo") => {
|
||||
let (move1, move2, move3) = if strike == current_strike {
|
||||
let (move1, move2) = if strike == current_strike {
|
||||
match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
}
|
||||
} else {
|
||||
(1.0, 1.0, 0.0)
|
||||
(1.0, 1.0)
|
||||
};
|
||||
|
||||
if move2 > 0.0 {
|
||||
next.main_weapon_trail = true;
|
||||
} else {
|
||||
next.main_weapon_trail = false;
|
||||
}
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
match strike {
|
||||
0 => {
|
||||
@ -198,12 +201,14 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.offensive_advance") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -228,26 +233,20 @@ impl Animation for ComboAnimation {
|
||||
next.shorts.orientation.rotate_z(move2 * 1.2);
|
||||
next.control.orientation.rotate_z(move2 * -3.5);
|
||||
next.control.position += Vec3::new(move2 * 9.0, move2 * 4.0, 0.0);
|
||||
|
||||
next.chest.orientation.rotate_z(move3 * 0.7);
|
||||
next.head.orientation.rotate_z(move3 * -0.4);
|
||||
next.belt.orientation.rotate_z(move3 * -0.2);
|
||||
next.shorts.orientation.rotate_z(move3 * -0.5);
|
||||
next.control.orientation.rotate_z(move3 * 0.4);
|
||||
next.control.orientation.rotate_x(move3 * 1.4);
|
||||
next.control.position += Vec3::new(move3 * -9.0, 0.0, 0.0);
|
||||
},
|
||||
Some("common.abilities.sword.crippling_combo") => {
|
||||
let (move1, move2, move3) = if strike == current_strike {
|
||||
let (move1, move2) = if strike == current_strike {
|
||||
match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time, 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
}
|
||||
} else {
|
||||
(1.0, 1.0, 0.0)
|
||||
(1.0, 1.0)
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
match strike {
|
||||
0 => {
|
||||
@ -299,12 +298,14 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.crippling_gouge") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -331,16 +332,20 @@ impl Animation for ComboAnimation {
|
||||
next.control.position += Vec3::new(0.0, move2 * 6.0, move2 * -3.0);
|
||||
},
|
||||
Some("common.abilities.sword.crippling_strike") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
|
||||
let move2alt = move2.min(0.5) * 2.0;
|
||||
let move2 = (move2.max(0.5) - 0.5) * 2.0;
|
||||
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
let move2alt = move2alt * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
|
||||
@ -374,16 +379,20 @@ impl Animation for ComboAnimation {
|
||||
next.control.position += Vec3::new(move2 * 14.0, move2 * 3.0, move2 * 6.0);
|
||||
},
|
||||
Some("common.abilities.sword.cleaving_combo") => {
|
||||
let (move1, move2, move3) = if strike == current_strike {
|
||||
let (move1, move2) = if strike == current_strike {
|
||||
match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powf(0.5), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powf(0.5)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
}
|
||||
} else {
|
||||
(1.0, 1.0, 0.0)
|
||||
(1.0, 1.0)
|
||||
};
|
||||
let move2_slow = move2.powf(0.5);
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
let move2_slow = move2_slow * multi_strike_pullback;
|
||||
|
||||
match strike {
|
||||
0 => {
|
||||
@ -438,7 +447,7 @@ impl Animation for ComboAnimation {
|
||||
1 => {
|
||||
next.chest.position += Vec3::new(0.0, move1 * 5.0, 0.0);
|
||||
next.foot_l.position +=
|
||||
Vec3::new(0.0, move1 * 3.0 + move2.powf(0.5) * 6.0, 0.0);
|
||||
Vec3::new(0.0, move1 * 3.0 + move2_slow * 6.0, 0.0);
|
||||
next.foot_r.position += Vec3::new(0.0, move1 * -2.0, 0.0);
|
||||
next.foot_r.orientation.rotate_x(move1 * -0.2);
|
||||
next.shorts.orientation.rotate_z(move1 * -0.8);
|
||||
@ -460,14 +469,18 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.cleaving_spin") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
|
||||
let move2_no_pullback = move2;
|
||||
let move2_pre = move2.min(0.3) * 10.0 / 3.0;
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
let move2_pre = move2_pre * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -490,7 +503,7 @@ impl Animation for ComboAnimation {
|
||||
|
||||
next.control.orientation.rotate_y(move2_pre * -1.6);
|
||||
next.control.position += Vec3::new(0.0, 0.0, move2_pre * 4.0);
|
||||
next.torso.orientation.rotate_z(move2 * -6.0);
|
||||
next.torso.orientation.rotate_z(move2_no_pullback * -6.0);
|
||||
next.chest.orientation.rotate_z(move2 * -2.0);
|
||||
next.head.orientation.rotate_z(move2 * 1.3);
|
||||
next.belt.orientation.rotate_z(move2 * 0.6);
|
||||
@ -500,16 +513,18 @@ impl Animation for ComboAnimation {
|
||||
next.control.position += Vec3::new(move2 * 14.0, 0.0, 0.0);
|
||||
},
|
||||
Some("common.abilities.sword.defensive_combo") => {
|
||||
let (move1, move2, move3) = if strike == current_strike {
|
||||
let (move1, move2) = if strike == current_strike {
|
||||
match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powf(0.5), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powf(0.5)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
}
|
||||
} else {
|
||||
(1.0, 1.0, 0.0)
|
||||
(1.0, 1.0)
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
match strike {
|
||||
0 => {
|
||||
@ -559,14 +574,14 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.defensive_retreat") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(2)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
|
||||
let move2_pre = move2.min(0.3) * 10.0 / 3.0;
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -587,27 +602,27 @@ impl Animation for ComboAnimation {
|
||||
next.head.orientation.rotate_z(move2 * 0.9);
|
||||
next.belt.orientation.rotate_z(move2 * 0.4);
|
||||
next.shorts.orientation.rotate_z(move2 * 1.0);
|
||||
next.control.orientation.rotate_y(move2 * -1.6);
|
||||
next.control
|
||||
.orientation
|
||||
.rotate_y(move2 * -1.6 + move3 * 1.6);
|
||||
next.control
|
||||
.orientation
|
||||
.rotate_z(move1 * 0.3 + move2 * -1.5 + move3 * -0.4);
|
||||
next.control.position += Vec3::new(move2 * 12.0 + move3 * -12.0, 0.0, 0.0);
|
||||
.rotate_z(move1 * 0.3 + move2 * -1.5);
|
||||
next.control.position += Vec3::new(move2 * 12.0, 0.0, 0.0);
|
||||
},
|
||||
Some("common.abilities.sword.parrying_combo") => {
|
||||
let (move1, move2, move3) = if strike == current_strike {
|
||||
let (move1, move2) = if strike == current_strike {
|
||||
match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.5), 0.0, 0.0),
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.5), 0.0),
|
||||
Some(StageSection::Action) => {
|
||||
(1.0, (anim_time.min(2.0 / 3.0) * 1.5).powi(2), 0.0)
|
||||
(1.0, (anim_time.min(2.0 / 3.0) * 1.5).powi(2))
|
||||
},
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
}
|
||||
} else {
|
||||
(1.0, 1.0, 0.0)
|
||||
(1.0, 1.0)
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
match strike {
|
||||
0 => {
|
||||
@ -660,16 +675,16 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.parrying_counter") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.5), 0.0, 0.0),
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.5), 0.0),
|
||||
Some(StageSection::Action) => {
|
||||
(1.0, (anim_time.min(2.0 / 3.0) * 1.5).powi(2), 0.0)
|
||||
(1.0, (anim_time.min(2.0 / 3.0) * 1.5).powi(2))
|
||||
},
|
||||
Some(StageSection::Recover) => {
|
||||
(1.0, 1.0, (anim_time.min(0.5) * 2.0).powf(0.5))
|
||||
},
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -686,16 +701,12 @@ impl Animation for ComboAnimation {
|
||||
next.foot_l.orientation = Quaternion::identity();
|
||||
next.foot_r.orientation = Quaternion::identity();
|
||||
|
||||
next.foot_r.position += Vec3::new(
|
||||
0.0,
|
||||
move1 * 4.0 - move3 * 4.0,
|
||||
(1.0 - (move1 - 0.5) * 2.0) * 2.0,
|
||||
);
|
||||
next.torso.position += Vec3::new(0.0, move1 * -2.0 + move3 * 2.0, 0.0);
|
||||
next.chest.position +=
|
||||
Vec3::new(0.0, move1 * 2.0 - move3 * 2.0, move1 * -3.0 + move3 * 3.0);
|
||||
next.shorts.orientation = Quaternion::rotation_x(move1 * 0.5 - move3 * 0.5);
|
||||
next.shorts.position += Vec3::new(0.0, move1 * 1.5 - move3 * 1.5, 0.0);
|
||||
next.foot_r.position +=
|
||||
Vec3::new(0.0, move1 * 4.0, (1.0 - (move1 - 0.5) * 2.0) * 2.0);
|
||||
next.torso.position += Vec3::new(0.0, move1 * -2.0, 0.0);
|
||||
next.chest.position += Vec3::new(0.0, move1 * 2.0, move1 * -3.0);
|
||||
next.shorts.orientation = Quaternion::rotation_x(move1 * 0.5);
|
||||
next.shorts.position += Vec3::new(0.0, move1 * 1.5, 0.0);
|
||||
next.control.orientation.rotate_y(move1 * -1.5);
|
||||
next.control.orientation.rotate_z(move1 * 0.8);
|
||||
|
||||
@ -703,27 +714,25 @@ impl Animation for ComboAnimation {
|
||||
next.head.orientation = Quaternion::rotation_z(move2 * 0.4);
|
||||
next.shorts.orientation.rotate_z(move2 * 0.5);
|
||||
next.belt.orientation = Quaternion::rotation_z(move2 * 0.1);
|
||||
next.control
|
||||
.orientation
|
||||
.rotate_z(move2 * -1.4 + move3 * -0.5);
|
||||
next.control.orientation.rotate_x(move2 * 0.5 + move3 * 0.2);
|
||||
next.control.orientation.rotate_z(move2 * -1.4);
|
||||
next.control.orientation.rotate_x(move2 * 0.5);
|
||||
next.control.position += Vec3::new(move2 * 7.0, 0.0, move2 * 6.0);
|
||||
},
|
||||
Some("common.abilities.sword.heavy_combo") => {
|
||||
let (move1, move2, move3) = if strike == current_strike {
|
||||
let (move1, move2) = if strike == current_strike {
|
||||
match stage_section {
|
||||
Some(StageSection::Buildup) => {
|
||||
(((anim_time.max(0.4) - 0.4) * 1.5).powf(0.5), 0.0, 0.0)
|
||||
(((anim_time.max(0.4) - 0.4) * 1.5).powf(0.5), 0.0)
|
||||
},
|
||||
Some(StageSection::Action) => {
|
||||
(1.0, (anim_time.min(0.4) * 2.5).powi(2), 0.0)
|
||||
},
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, (anim_time.min(0.4) * 2.5).powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
}
|
||||
} else {
|
||||
(1.0, 1.0, 0.0)
|
||||
(1.0, 1.0)
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
match strike {
|
||||
0 => {
|
||||
@ -777,12 +786,14 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.heavy_pommelstrike") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -809,22 +820,18 @@ impl Animation for ComboAnimation {
|
||||
next.control.orientation.rotate_z(move2 * 0.4);
|
||||
},
|
||||
Some("common.abilities.sword.mobility_combo") => {
|
||||
let (move1, move2, move3) = if strike == current_strike {
|
||||
let (move1, move2) = if strike == current_strike {
|
||||
match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
}
|
||||
} else {
|
||||
(1.0, 1.0, 0.0)
|
||||
(1.0, 1.0)
|
||||
};
|
||||
|
||||
if move2 > 0.0 {
|
||||
next.main_weapon_trail = true;
|
||||
} else {
|
||||
next.main_weapon_trail = false;
|
||||
}
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
match strike {
|
||||
0 => {
|
||||
@ -903,12 +910,14 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.mobility_feint") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -952,22 +961,18 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.reaching_combo") => {
|
||||
let (move1, move2, move3) = if strike == current_strike {
|
||||
let (move1, move2) = if strike == current_strike {
|
||||
match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
}
|
||||
} else {
|
||||
(1.0, 1.0, 0.0)
|
||||
(1.0, 1.0)
|
||||
};
|
||||
|
||||
if move2 > 0.0 {
|
||||
next.main_weapon_trail = true;
|
||||
} else {
|
||||
next.main_weapon_trail = false;
|
||||
}
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
match strike {
|
||||
0 => {
|
||||
@ -1019,12 +1024,14 @@ impl Animation for ComboAnimation {
|
||||
}
|
||||
},
|
||||
Some("common.abilities.sword.reaching_skewer") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
let (move1, move2) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0),
|
||||
Some(StageSection::Action) => (1.0, anim_time.powi(2)),
|
||||
Some(StageSection::Recover) => (1.0, 1.0),
|
||||
_ => (0.0, 0.0),
|
||||
};
|
||||
let move1 = move1 * multi_strike_pullback;
|
||||
let move2 = move2 * multi_strike_pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
|
@ -3,10 +3,9 @@ use super::{
|
||||
CharacterSkeleton, SkeletonAttr,
|
||||
};
|
||||
use common::{
|
||||
comp::item::{Hands, ToolKind},
|
||||
comp::item::Hands,
|
||||
states::utils::{AbilityInfo, StageSection},
|
||||
};
|
||||
use core::f32::consts::PI;
|
||||
|
||||
pub struct DashAnimation;
|
||||
|
||||
@ -28,7 +27,7 @@ impl Animation for DashAnimation {
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner<'a>(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, ability_id, _global_time, stage_section, ability_info): Self::Dependency<'a>,
|
||||
(_hands, ability_id, _global_time, stage_section, _ability_info): Self::Dependency<'a>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -38,16 +37,21 @@ impl Animation for DashAnimation {
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0);
|
||||
next.main_weapon_trail = true;
|
||||
|
||||
match ability_id {
|
||||
Some("common.abilities.sword.reaching_charge") => {
|
||||
let (move1, move2, move3, move4) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0, 0.0),
|
||||
Some(StageSection::Charge) => (1.0, anim_time / (anim_time + 0.1), 0.0, 0.0),
|
||||
Some(StageSection::Charge) => (1.0, anim_time, 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, 1.0, anim_time.powi(2), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move4;
|
||||
let move1 = move1 * pullback;
|
||||
let _move2 = move2 * pullback;
|
||||
let move3 = move3 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
|
@ -3,7 +3,6 @@ use super::{
|
||||
CharacterSkeleton, SkeletonAttr,
|
||||
};
|
||||
use common::states::utils::StageSection;
|
||||
use core::f32::consts::PI;
|
||||
|
||||
pub struct DiveMeleeAnimation;
|
||||
impl Animation for DiveMeleeAnimation {
|
||||
@ -23,11 +22,11 @@ impl Animation for DiveMeleeAnimation {
|
||||
) -> Self::Skeleton {
|
||||
*rate = 1.0;
|
||||
let mut next = (*skeleton).clone();
|
||||
next.main_weapon_trail = true;
|
||||
next.off_weapon_trail = true;
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0);
|
||||
next.main_weapon_trail = true;
|
||||
|
||||
let ground_dist = ground_dist.clamp(0.0, 0.5) * 2.0;
|
||||
let ground_dist = if ground_dist.is_nan() {
|
||||
0.0
|
||||
@ -48,6 +47,10 @@ impl Animation for DiveMeleeAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move4;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
let move3 = move3 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
|
@ -28,6 +28,8 @@ impl Animation for FinisherMeleeAnimation {
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0);
|
||||
next.main_weapon_trail = true;
|
||||
|
||||
match ability_id {
|
||||
Some("common.abilities.sword.balanced_finisher") => {
|
||||
let (move1, move2, move3) = match stage_section {
|
||||
@ -36,6 +38,9 @@ impl Animation for FinisherMeleeAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -65,6 +70,9 @@ impl Animation for FinisherMeleeAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -111,6 +119,12 @@ impl Animation for FinisherMeleeAnimation {
|
||||
let move1alt1 = move1.min(0.5) * 2.0;
|
||||
let move1alt2 = (move1.max(0.5) - 0.5) * 2.0;
|
||||
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move1alt1 = move1alt1 * pullback;
|
||||
let move1alt2 = move1alt2 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(s_a.shl.3 + move1alt2 * PI)
|
||||
* Quaternion::rotation_y(s_a.shl.4);
|
||||
@ -149,6 +163,13 @@ impl Animation for FinisherMeleeAnimation {
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
|
||||
let move2_fast = move2.powf(0.25);
|
||||
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
let move2_fast = move2_fast * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
|
||||
@ -170,7 +191,7 @@ impl Animation for FinisherMeleeAnimation {
|
||||
next.head.orientation.rotate_z(move2 * 0.5);
|
||||
next.belt.orientation.rotate_z(move2 * 0.3);
|
||||
next.shorts.orientation.rotate_z(move2 * 0.7);
|
||||
next.control.orientation.rotate_x(move2.powf(0.25) * -2.8);
|
||||
next.control.orientation.rotate_x(move2_fast * -2.8);
|
||||
next.control.position += Vec3::new(move2 * 12.0, 0.0, move2 * -10.0);
|
||||
},
|
||||
Some("common.abilities.sword.heavy_finisher") => {
|
||||
@ -181,12 +202,19 @@ impl Animation for FinisherMeleeAnimation {
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
|
||||
let move1_fast = move1.powf(0.5);
|
||||
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move1_fast = move1_fast * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-s_a.sc.0 + 6.0 + move1.powf(0.5) * -12.0,
|
||||
-4.0 + move1.powf(0.5) * 3.0,
|
||||
-s_a.sc.0 + 6.0 + move1_fast * -12.0,
|
||||
-4.0 + move1_fast * 3.0,
|
||||
-2.0,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.9 + move1 * 0.5);
|
||||
|
@ -3,7 +3,6 @@ use super::{
|
||||
CharacterSkeleton, SkeletonAttr,
|
||||
};
|
||||
use common::states::utils::StageSection;
|
||||
use core::f32::consts::PI;
|
||||
use std::ops::{Mul, Sub};
|
||||
|
||||
pub struct RapidMeleeAnimation;
|
||||
@ -27,6 +26,7 @@ impl Animation for RapidMeleeAnimation {
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0);
|
||||
next.main_weapon_trail = true;
|
||||
|
||||
match ability_id {
|
||||
Some("common.abilities.sword.reaching_flurry") => {
|
||||
@ -41,8 +41,9 @@ impl Animation for RapidMeleeAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 1.0),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
|
||||
let move2_slow = move2.powi(4);
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
|
@ -3,7 +3,6 @@ use super::{
|
||||
CharacterSkeleton, SkeletonAttr,
|
||||
};
|
||||
use common::states::utils::StageSection;
|
||||
use core::f32::consts::PI;
|
||||
|
||||
pub struct RiposteMeleeAnimation;
|
||||
impl Animation for RiposteMeleeAnimation {
|
||||
@ -26,6 +25,7 @@ impl Animation for RiposteMeleeAnimation {
|
||||
|
||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.main.orientation = Quaternion::rotation_z(0.0);
|
||||
next.main_weapon_trail = true;
|
||||
|
||||
match ability_id {
|
||||
Some("common.abilities.sword.parrying_riposte") => {
|
||||
@ -38,6 +38,11 @@ impl Animation for RiposteMeleeAnimation {
|
||||
|
||||
let move2_slow = move2.powi(4);
|
||||
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
let move2_slow = move2_slow * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(s_a.shl.3) * Quaternion::rotation_y(s_a.shl.4);
|
||||
@ -64,12 +69,9 @@ impl Animation for RiposteMeleeAnimation {
|
||||
next.control.orientation.rotate_y(move2 * -4.0);
|
||||
next.control
|
||||
.orientation
|
||||
.rotate_z(move2_slow * -3.0 + move2.powf(0.25) * 1.0);
|
||||
.rotate_z(move2_slow * -3.0 + move2 * 1.0);
|
||||
next.control.position +=
|
||||
Vec3::new(move2_slow * 11.0, move2_slow * -4.0, move2_slow * -6.0);
|
||||
// next.control.orientation.rotate_y(move2.min(0.5) * 2.0 *
|
||||
// -2.4); next.control.orientation.
|
||||
// rotate_x((move2.max(0.5) - 0.5) * 2.0 * 1.8);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ use super::{
|
||||
CharacterSkeleton, SkeletonAttr,
|
||||
};
|
||||
use common::states::utils::StageSection;
|
||||
use core::f32::consts::PI;
|
||||
|
||||
pub struct SelfBuffAnimation;
|
||||
impl Animation for SelfBuffAnimation {
|
||||
@ -35,6 +34,9 @@ impl Animation for SelfBuffAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -70,6 +72,9 @@ impl Animation for SelfBuffAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
@ -101,6 +106,9 @@ impl Animation for SelfBuffAnimation {
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.hand_l.position = Vec3::new(s_a.shl.0, s_a.shl.1, s_a.shl.2);
|
||||
next.hand_l.orientation =
|
||||
|
Loading…
Reference in New Issue
Block a user