Finisher abilities

This commit is contained in:
Sam 2022-12-19 20:58:38 -05:00
parent 86dfa34ec9
commit 27463758e5
12 changed files with 281 additions and 684 deletions

View File

@ -1,39 +1,20 @@
ComboMelee2( RapidMelee(
strikes: [ buildup_duration: 0.1,
( swing_duration: 0.033,
melee_constructor: ( recover_duration: 0.1,
kind: Slash( melee_constructor: (
damage: 5, kind: Slash(
poise: 0, damage: 2,
knockback: 0, poise: 0,
energy_regen: 5, knockback: 0,
), energy_regen: 0,
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
), ),
( range: 3.0,
melee_constructor: ( angle: 10.0,
kind: Slash( ),
damage: 10, energy_cost: 2,
poise: 0, max_strikes: Some(20),
knockback: 0, move_modifier: 0.6,
energy_regen: 7.5, ori_modifier: 0.4,
), minimum_combo: 20,
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
) )

View File

@ -1,39 +1,17 @@
ComboMelee2( FinisherMelee(
strikes: [ energy_cost: 30,
( buildup_duration: 0.2,
melee_constructor: ( swing_duration: 0.1,
kind: Slash( recover_duration: 0.4,
damage: 5, melee_constructor: (
poise: 0, kind: Slash(
knockback: 0, damage: 40,
energy_regen: 5, poise: 10,
), knockback: 0,
range: 3.0, energy_regen: 0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
), ),
( range: 3.0,
melee_constructor: ( angle: 15.0,
kind: Slash( ),
damage: 10, minimum_combo: 15,
poise: 0,
knockback: 0,
energy_regen: 7.5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
) )

View File

@ -1,39 +1,21 @@
ComboMelee2( RapidMelee(
strikes: [ buildup_duration: 0.3,
( swing_duration: 0.15,
melee_constructor: ( recover_duration: 0.3,
kind: Slash( melee_constructor: (
damage: 5, kind: Slash(
poise: 0, damage: 8,
knockback: 0, poise: 10,
energy_regen: 5, knockback: 0,
), energy_regen: 0,
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
), ),
( range: 4.0,
melee_constructor: ( angle: 360.0,
kind: Slash( multi_target: Some(Normal),
damage: 10, ),
poise: 0, energy_cost: 5,
knockback: 0, max_strikes: Some(6),
energy_regen: 7.5, move_modifier: 0.8,
), ori_modifier: 1.0,
range: 3.0, minimum_combo: 10,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
) )

View File

@ -1,39 +1,21 @@
ComboMelee2( RapidMelee(
strikes: [ buildup_duration: 0.1,
( swing_duration: 0.1,
melee_constructor: ( recover_duration: 0.3,
kind: Slash( melee_constructor: (
damage: 5, kind: Slash(
poise: 0, damage: 10,
knockback: 0, poise: 5,
energy_regen: 5, knockback: 0,
), energy_regen: 0,
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
), ),
( range: 4.0,
melee_constructor: ( angle: 15.0,
kind: Slash( damage_effect: Some(BuffsVulnerable(1.0, Bleeding)),
damage: 10, ),
poise: 0, energy_cost: 7.5,
knockback: 0, max_strikes: Some(4),
energy_regen: 7.5, move_modifier: 0.7,
), ori_modifier: 0.2,
range: 3.0, minimum_combo: 12,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
) )

View File

@ -1,39 +1,18 @@
ComboMelee2( FinisherMelee(
strikes: [ energy_cost: 30,
( buildup_duration: 0.05,
melee_constructor: ( swing_duration: 0.1,
kind: Slash( recover_duration: 0.6,
damage: 5, melee_constructor: (
poise: 0, kind: Slash(
knockback: 0, damage: 20,
energy_regen: 5, poise: 10,
), knockback: 0,
range: 3.0, energy_regen: 0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
), ),
( range: 3.0,
melee_constructor: ( angle: 15.0,
kind: Slash( damage_effect: Some(BuffsVulnerable(2.0, Parried)),
damage: 10, ),
poise: 0, minimum_combo: 15,
knockback: 0,
energy_regen: 7.5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
) )

View File

@ -1,39 +1,17 @@
ComboMelee2( FinisherMelee(
strikes: [ energy_cost: 30,
( buildup_duration: 0.4,
melee_constructor: ( swing_duration: 0.1,
kind: Slash( recover_duration: 0.6,
damage: 5, melee_constructor: (
poise: 0, kind: Slash(
knockback: 0, damage: 60,
energy_regen: 5, poise: 100,
), knockback: 0,
range: 3.0, energy_regen: 0,
angle: 45.0,
),
buildup_duration: 0.15,
swing_duration: 0.05,
hit_timing: 0.5,
recover_duration: 0.1,
ori_modifier: 0.6,
), ),
( range: 3.0,
melee_constructor: ( angle: 15.0,
kind: Slash( ),
damage: 10, minimum_combo: 10,
poise: 0,
knockback: 0,
energy_regen: 7.5,
),
range: 3.0,
angle: 45.0,
),
buildup_duration: 0.1,
swing_duration: 0.1,
hit_timing: 0.5,
recover_duration: 0.2,
ori_modifier: 0.6,
),
],
energy_cost_per_strike: 0,
) )

View File

@ -806,6 +806,8 @@ pub enum CharacterAbility {
move_modifier: f32, move_modifier: f32,
ori_modifier: f32, ori_modifier: f32,
#[serde(default)] #[serde(default)]
minimum_combo: u32,
#[serde(default)]
meta: AbilityMeta, meta: AbilityMeta,
}, },
} }
@ -862,7 +864,6 @@ impl CharacterAbility {
| CharacterAbility::BasicBlock { energy_cost, .. } | CharacterAbility::BasicBlock { energy_cost, .. }
| CharacterAbility::SelfBuff { energy_cost, .. } | CharacterAbility::SelfBuff { energy_cost, .. }
| CharacterAbility::RiposteMelee { energy_cost, .. } | CharacterAbility::RiposteMelee { energy_cost, .. }
| CharacterAbility::RapidMelee { energy_cost, .. }
| CharacterAbility::ComboMelee2 { | CharacterAbility::ComboMelee2 {
energy_cost_per_strike: energy_cost, energy_cost_per_strike: energy_cost,
.. ..
@ -890,6 +891,11 @@ impl CharacterAbility {
energy_cost, energy_cost,
minimum_combo, minimum_combo,
.. ..
}
| CharacterAbility::RapidMelee {
energy_cost,
minimum_combo,
..
} => { } => {
data.combo.map_or(false, |c| c.counter() >= *minimum_combo) data.combo.map_or(false, |c| c.counter() >= *minimum_combo)
&& update.energy.try_change_by(-*energy_cost).is_ok() && update.energy.try_change_by(-*energy_cost).is_ok()
@ -1476,6 +1482,7 @@ impl CharacterAbility {
max_strikes: _, max_strikes: _,
move_modifier: _, move_modifier: _,
ori_modifier: _, ori_modifier: _,
minimum_combo: _,
meta: _, meta: _,
} => { } => {
*buildup_duration /= stats.speed; *buildup_duration /= stats.speed;
@ -1542,7 +1549,9 @@ impl CharacterAbility {
0 0
} }
}, },
FinisherMelee { minimum_combo, .. } => *minimum_combo, FinisherMelee { minimum_combo, .. } | RapidMelee { minimum_combo, .. } => {
*minimum_combo
},
BasicMelee { .. } BasicMelee { .. }
| BasicRanged { .. } | BasicRanged { .. }
| RepeaterRanged { .. } | RepeaterRanged { .. }
@ -1559,7 +1568,6 @@ impl CharacterAbility {
| ComboMelee2 { .. } | ComboMelee2 { .. }
| DiveMelee { .. } | DiveMelee { .. }
| RiposteMelee { .. } | RiposteMelee { .. }
| RapidMelee { .. }
| BasicBeam { .. } | BasicBeam { .. }
| Boost { .. } | Boost { .. }
| ComboMelee { .. } | ComboMelee { .. }
@ -2820,6 +2828,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
max_strikes, max_strikes,
move_modifier, move_modifier,
ori_modifier, ori_modifier,
minimum_combo,
meta: _, meta: _,
} => CharacterState::RapidMelee(rapid_melee::Data { } => CharacterState::RapidMelee(rapid_melee::Data {
static_data: rapid_melee::StaticData { static_data: rapid_melee::StaticData {
@ -2831,6 +2840,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
max_strikes: *max_strikes, max_strikes: *max_strikes,
move_modifier: *move_modifier, move_modifier: *move_modifier,
ori_modifier: *ori_modifier, ori_modifier: *ori_modifier,
minimum_combo: *minimum_combo,
ability_info, ability_info,
}, },
timer: Duration::default(), timer: Duration::default(),

View File

@ -4,6 +4,7 @@ use crate::{
behavior::{CharacterBehavior, JoinData}, behavior::{CharacterBehavior, JoinData},
utils::*, utils::*,
}, },
event::ServerEvent,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::time::Duration; use std::time::Duration;
@ -25,6 +26,7 @@ pub struct StaticData {
pub max_strikes: Option<u32>, pub max_strikes: Option<u32>,
pub move_modifier: f32, pub move_modifier: f32,
pub ori_modifier: f32, pub ori_modifier: f32,
pub minimum_combo: u32,
/// What key is used to press ability /// What key is used to press ability
pub ability_info: AbilityInfo, pub ability_info: AbilityInfo,
} }
@ -45,7 +47,7 @@ pub struct Data {
} }
impl CharacterBehavior for Data { impl CharacterBehavior for Data {
fn behavior(&self, data: &JoinData, _: &mut OutputEvents) -> StateUpdate { fn behavior(&self, data: &JoinData, output_events: &mut OutputEvents) -> StateUpdate {
let mut update = StateUpdate::from(data); let mut update = StateUpdate::from(data);
handle_orientation(data, &mut update, self.static_data.ori_modifier, None); handle_orientation(data, &mut update, self.static_data.ori_modifier, None);
@ -65,6 +67,14 @@ impl CharacterBehavior for Data {
c.timer = Duration::default(); c.timer = Duration::default();
c.stage_section = StageSection::Action; c.stage_section = StageSection::Action;
} }
// Consume combo if any was required
if self.static_data.minimum_combo > 0 {
output_events.emit_server(ServerEvent::ComboChange {
entity: data.entity,
change: -data.combo.map_or(0, |c| c.counter() as i32),
});
}
} }
}, },
StageSection::Action => { StageSection::Action => {

View File

@ -851,330 +851,6 @@ impl Animation for ComboAnimation {
next.control.orientation.rotate_x(move2 * 2.7); next.control.orientation.rotate_x(move2 * 2.7);
next.control.position += Vec3::new(0.0, move2 * -9.0, move2 * 17.0); next.control.position += Vec3::new(0.0, move2 * -9.0, move2 * 17.0);
}, },
Some("common.abilities.sword.defensive_combo") => {
let (move1, move2) = if strike == current_strike {
match stage_section {
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)
};
let move1 = move1 * multi_strike_pullback;
let move2 = move2 * multi_strike_pullback;
match strike {
0 => {
let s1_move1_hack = if current_strike == 1 { move1 } else { 0.0 };
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 * -12.0,
-4.0 + move1 * 3.0,
-2.0,
);
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)
* Quaternion::rotation_z(s1_move1_hack * PI);
next.chest.orientation = Quaternion::rotation_z(move1 * 0.8);
next.head.orientation = Quaternion::rotation_z(move1 * -0.3);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.2);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.6);
next.control.position += Vec3::new(0.0, 0.0, move1 * 5.0);
next.chest.orientation.rotate_z(move2 * -1.9);
next.head.orientation.rotate_z(move2 * 1.3);
next.belt.orientation.rotate_z(move2 * 0.7);
next.shorts.orientation.rotate_z(move2 * 1.5);
next.control.orientation.rotate_y(move2 * -1.6);
next.control.orientation.rotate_z(move2 * -1.1);
next.control.position +=
Vec3::new(move2 * 12.0, move2 * 5.0, move2 * -1.0);
},
1 => {
next.belt.orientation.rotate_z(move1 * 0.2);
next.shorts.orientation.rotate_z(move1 * 0.3);
next.control.position += Vec3::new(0.0, move1 * -5.0, move1 * 1.0);
next.chest.orientation.rotate_z(move2 * 2.1);
next.head.orientation.rotate_z(move2 * -1.2);
next.belt.orientation.rotate_z(move2 * -1.0);
next.shorts.orientation.rotate_z(move2 * -1.8);
next.control.orientation.rotate_z(move2 * 0.9);
next.control.position +=
Vec3::new(move2 * -12.0, move2 * 2.0, move2 * -1.0);
},
_ => {},
}
},
Some("common.abilities.sword.parrying_combo") => {
let (move1, move2) = if strike == current_strike {
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))
},
Some(StageSection::Recover) => (1.0, 1.0),
_ => (0.0, 0.0),
}
} else {
(1.0, 1.0)
};
let move1 = move1 * multi_strike_pullback;
let move2 = move2 * multi_strike_pullback;
match strike {
0 => {
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 * -12.0,
-4.0 + move1 * 3.0,
-2.0,
);
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)
* Quaternion::rotation_z(move1 * PI / 4.0 + move2 * -PI / 2.0);
next.chest.orientation = Quaternion::rotation_z(move1 * 0.8);
next.head.orientation = Quaternion::rotation_z(move1 * -0.4);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.3);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.6);
next.control.orientation.rotate_z(move1 * -1.5);
next.control.orientation.rotate_x(move1 * 0.5);
next.control.orientation.rotate_y(move1 * 1.5);
next.control.position += Vec3::new(0.0, move1 * 5.0, move1 * 12.0);
next.chest.orientation.rotate_z(move2 * -1.5);
next.head.orientation.rotate_z(move2 * 0.9);
next.belt.orientation.rotate_z(move2 * 0.5);
next.shorts.orientation.rotate_z(move2 * 1.1);
next.control.orientation.rotate_y(move2 * -4.0);
next.control.orientation.rotate_z(move2 * -1.0);
next.control.position +=
Vec3::new(move2 * 12.0, move2 * -6.0, move2 * -9.0);
},
1 => {
next.control.position +=
Vec3::new(move1 * -10.0, move1 * 3.0, move1 * 5.0);
next.chest.orientation.rotate_z(move1 * 1.8);
next.head.orientation.rotate_z(move1 * -1.3);
next.belt.orientation.rotate_z(move1 * -0.7);
next.shorts.orientation.rotate_z(move1 * -1.4);
next.control.orientation.rotate_z(move1.powi(2) * -2.6);
next.control.orientation.rotate_x(move1 * 0.3);
next.control.orientation.rotate_y(move1 * -0.2);
next.control.position +=
Vec3::new(move2 * 12.0, move2 * 2.0, move2 * -1.0);
},
_ => {},
}
},
Some("common.abilities.sword.parrying_counter") => {
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))
},
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 =
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 * -12.0, -4.0 + move1 * 3.0, -2.0);
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)
* Quaternion::rotation_z(move2 * -PI / 4.0);
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.foot_l.orientation = Quaternion::identity();
next.foot_r.orientation = Quaternion::identity();
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);
next.chest.orientation = Quaternion::rotation_z(move2 * -0.7);
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);
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.mobility_combo") => {
let (move1, move2) = if strike == current_strike {
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),
}
} else {
(1.0, 1.0)
};
let move1 = move1 * multi_strike_pullback;
let move2 = move2 * multi_strike_pullback;
match strike {
0 => {
let rotate_hack = if current_strike > 0 { move1 * 1.9 } else { 0.0 }
+ if current_strike > 2 { move1 * 0.0 } else { 0.0 };
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 * -12.0,
-4.0 + move1 * 3.0,
-2.0,
);
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)
* Quaternion::rotation_z(move2 * -0.3 + rotate_hack);
next.chest.orientation = Quaternion::rotation_z(move1 * 0.3);
next.head.orientation = Quaternion::rotation_z(move1 * -0.1);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.2);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.1);
next.control.orientation.rotate_y(move1 * -0.3);
next.control.position += Vec3::new(0.0, 0.0, move1 * 7.0);
next.chest.orientation.rotate_z(move2 * -1.0);
next.head.orientation.rotate_z(move2 * 0.6);
next.shorts.orientation.rotate_z(move2 * 0.7);
next.belt.orientation.rotate_z(move2 * 0.3);
next.control.orientation.rotate_x(move2 * -1.1);
next.control.orientation.rotate_z(move2 * -0.3);
next.control.position +=
Vec3::new(move2 * 11.0, move2 * 3.0, move2 * -8.0);
},
1 => {
next.control.position += Vec3::new(0.0, 0.0, move1 * 4.0);
next.control.orientation.rotate_x(move1 * 0.1);
next.control.orientation.rotate_z(move1 * -0.2);
next.chest.orientation.rotate_z(move2 * 1.4);
next.head.orientation.rotate_z(move2 * -0.8);
next.shorts.orientation.rotate_z(move2 * -0.9);
next.belt.orientation.rotate_z(move2 * -0.5);
next.control.position += Vec3::new(move2 * -9.0, 0.0, 0.0);
next.control.orientation.rotate_z(move2 * 0.7);
},
2 => {
next.control.orientation.rotate_y(move1 * -3.7);
next.control.orientation.rotate_z(move1 * 0.6);
next.control.position += Vec3::new(0.0, move1 * -2.0, move1 * -4.0);
next.chest.orientation.rotate_z(move2 * -1.3);
next.head.orientation.rotate_z(move2 * 0.7);
next.shorts.orientation.rotate_z(move2 * 0.9);
next.belt.orientation.rotate_z(move2 * 0.4);
next.control.orientation.rotate_z(move2 * -0.7);
next.control.orientation.rotate_x(move2 * 0.3);
next.control.position +=
Vec3::new(move2 * 10.0, move2 * 2.0, move2 * 8.0);
},
3 => {
next.control.orientation.rotate_x(move1 * -0.5);
next.control.orientation.rotate_z(move1 * -1.3);
next.control.orientation.rotate_x(move1 * 4.4);
next.control.orientation.rotate_z(move1 * 1.3);
next.control.position += Vec3::new(0.0, 0.0, move1 * -6.0);
next.chest.orientation.rotate_z(move2 * 1.2);
next.head.orientation.rotate_z(move2 * -0.7);
next.shorts.orientation.rotate_z(move2 * -0.8);
next.belt.orientation.rotate_z(move2 * -0.3);
next.control.position += Vec3::new(move2 * -9.0, 0.0, move2 * 4.0);
},
_ => {},
}
},
Some("common.abilities.sword.reaching_combo") => {
let (move1, move2) = if strike == current_strike {
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),
}
} else {
(1.0, 1.0)
};
let move1 = move1 * multi_strike_pullback;
let move2 = move2 * multi_strike_pullback;
match strike {
0 => {
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 * -12.0,
-4.0 + move1 * 3.0,
-2.0,
);
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.chest.orientation = Quaternion::rotation_z(move1 * -0.6);
next.head.orientation = Quaternion::rotation_z(move1 * 0.3);
next.shorts.orientation = Quaternion::rotation_z(move1 * 0.4);
next.belt.orientation = Quaternion::rotation_z(move1 * 0.2);
next.control.orientation.rotate_x(move1 * -1.05);
next.control.orientation.rotate_z(move1 * 0.6);
next.control.position += Vec3::new(move1 * 12.0, move1 * -2.0, 0.0);
next.chest.orientation.rotate_z(move2 * 0.6);
next.head.orientation.rotate_z(move2 * -0.2);
next.shorts.orientation.rotate_z(move2 * -0.4);
next.belt.orientation.rotate_z(move2 * -0.2);
next.control.orientation.rotate_z(move2 * -0.6);
next.control.position +=
Vec3::new(move2 * -2.0, move2 * 12.0, move2 * 5.0);
},
1 => {
next.chest.orientation.rotate_z(move1 * 0.5);
next.head.orientation.rotate_z(move1 * -0.3);
next.shorts.orientation.rotate_z(move1 * -0.3);
next.belt.orientation.rotate_z(move1 * -0.1);
next.control.orientation.rotate_z(move1 * -0.5);
next.control.position +=
Vec3::new(move1 * -7.0, move1 * -12.0, move1 * -4.0);
next.chest.orientation.rotate_z(move2 * -1.0);
next.head.orientation.rotate_z(move2 * 0.4);
next.shorts.orientation.rotate_z(move2 * 0.6);
next.belt.orientation.rotate_z(move2 * 0.2);
next.control.orientation.rotate_z(move2 * 1.0);
next.control.position += Vec3::new(0.0, move2 * 11.0, move2 * 3.0);
},
_ => {},
}
},
_ => {}, _ => {},
} }
} }

View File

@ -27,10 +27,10 @@ impl Animation for DashAnimation {
#[allow(clippy::single_match)] // TODO: Pending review in #587 #[allow(clippy::single_match)] // TODO: Pending review in #587
fn update_skeleton_inner( fn update_skeleton_inner(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(_hands, ability_id, _global_time, stage_section, _ability_info): Self::Dependency<'_>, (_hands, ability_id, _global_time, _stage_section, _ability_info): Self::Dependency<'_>,
anim_time: f32, _anim_time: f32,
rate: &mut f32, rate: &mut f32,
s_a: &SkeletonAttr, _s_a: &SkeletonAttr,
) -> Self::Skeleton { ) -> Self::Skeleton {
*rate = 1.0; *rate = 1.0;
let mut next = (*skeleton).clone(); let mut next = (*skeleton).clone();
@ -43,42 +43,6 @@ impl Animation for DashAnimation {
next.off_weapon_trail = true; next.off_weapon_trail = true;
match ability_id { 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, 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 =
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 * -12.0, -4.0 + move1 * 3.0, -2.0);
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.chest.orientation.rotate_z(move1 * 0.4);
next.head.orientation.rotate_z(move1 * -0.2);
next.shorts.orientation.rotate_z(move1 * -0.3);
next.belt.orientation.rotate_z(move1 * -0.1);
next.control.orientation.rotate_z(move1 * -0.7);
next.control.orientation.rotate_x(move3 * -1.1);
next.chest.orientation.rotate_z(move3 * -1.1);
next.head.orientation.rotate_z(move3 * 0.4);
next.shorts.orientation.rotate_z(move3 * 0.5);
next.belt.orientation.rotate_z(move3 * 0.2);
next.control.orientation.rotate_z(move3 * 0.9);
next.control.position += Vec3::new(0.0, move3 * 6.0, 0.0);
},
_ => {}, _ => {},
} }

View File

@ -32,7 +32,7 @@ impl Animation for FinisherMeleeAnimation {
next.off_weapon_trail = true; next.off_weapon_trail = true;
match ability_id { match ability_id {
Some("common.abilities.sword.balanced_finisher") => { Some("common.abilities.sword.basic_mighty_strike") => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0), Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time.powf(0.1), 0.0), Some(StageSection::Action) => (1.0, anim_time.powf(0.1), 0.0),
@ -64,91 +64,7 @@ impl Animation for FinisherMeleeAnimation {
next.belt.orientation = Quaternion::rotation_z(move1 * -0.25 + move2 * 0.2); next.belt.orientation = Quaternion::rotation_z(move1 * -0.25 + move2 * 0.2);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.5 + move2 * 0.4); next.shorts.orientation = Quaternion::rotation_z(move1 * -0.5 + move2 * 0.4);
}, },
Some("common.abilities.sword.offensive_finisher") => { Some("common.abilities.sword.heavy_guillotine") => {
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 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 =
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 * -12.0, -4.0 + move1 * 3.0, -2.0);
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.chest.orientation = Quaternion::rotation_z(move1 * 0.9);
next.head.orientation = Quaternion::rotation_z(move1 * -0.4);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.25);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.6);
next.foot_l.orientation = Quaternion::rotation_z(move1 * 0.8);
next.foot_l.position += Vec3::new(0.0, move1 * -5.0, 0.0);
next.control.orientation.rotate_x(move1 * 1.2);
next.control.position += Vec3::new(0.0, 0.0, move1 * 6.0);
next.chest.orientation.rotate_z(move2 * -1.7);
next.head.orientation.rotate_z(move2 * 0.8);
next.belt.orientation.rotate_z(move2 * 0.5);
next.shorts.orientation.rotate_z(move2 * 1.1);
next.foot_l.orientation.rotate_z(move2 * -0.8);
next.foot_l.position += Vec3::new(0.0, move2 * 5.0, 0.0);
next.control.orientation.rotate_x(move2 * -2.3);
next.control.orientation.rotate_z(move2 * 0.6);
next.control.position += Vec3::new(0.0, 0.0, move2 * -10.0);
next.chest.orientation.rotate_z(move3 * 0.6);
next.head.orientation.rotate_z(move3 * -0.2);
next.shorts.orientation.rotate_z(move3 * -0.2);
next.control.position += Vec3::new(0.0, 0.0, move3 * 4.0);
next.control.orientation.rotate_x(move3 * 0.6);
},
Some("common.abilities.sword.cleaving_finisher") => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.5), 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 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);
next.hand_r.position =
Vec3::new(-s_a.sc.0 + 6.0 + move1 * -12.0, -4.0 + move1 * 3.0, -2.0);
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) * Quaternion::rotation_z(move1 * -0.7);
next.chest.orientation = Quaternion::rotation_z(move1 * 0.4);
next.head.orientation = Quaternion::rotation_z(move1 * -0.1);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.1);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.3);
next.control.orientation.rotate_x(move1 * 1.4);
next.control.position += Vec3::new(move1 * -2.0, 0.0, move1 * 8.0);
next.chest.orientation.rotate_z(move2 * -0.9);
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_fast * -2.8);
next.control.position += Vec3::new(move2 * 12.0, 0.0, move2 * -10.0);
},
Some("common.abilities.sword.heavy_finisher") => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 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), Some(StageSection::Action) => (1.0, anim_time.powi(2), 0.0),
@ -192,6 +108,51 @@ impl Animation for FinisherMeleeAnimation {
next.control.position += Vec3::new(0.0, move2 * 12.0, 0.0); next.control.position += Vec3::new(0.0, move2 * 12.0, 0.0);
next.control.orientation.rotate_z(move2 * -0.1); next.control.orientation.rotate_z(move2 * -0.1);
}, },
Some("common.abilities.sword.defensive_counter") => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.5), 0.0, 0.0),
Some(StageSection::Action) => {
(1.0, (anim_time.min(2.0 / 3.0) * 1.5).powi(2), 0.0)
},
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 =
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 * -12.0, -4.0 + move1 * 3.0, -2.0);
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) * Quaternion::rotation_z(move2 * -PI / 4.0);
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.foot_l.orientation = Quaternion::identity();
next.foot_r.orientation = Quaternion::identity();
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);
next.chest.orientation = Quaternion::rotation_z(move2 * -0.7);
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);
next.control.orientation.rotate_x(move2 * 0.5);
next.control.position += Vec3::new(move2 * 7.0, 0.0, move2 * 6.0);
},
_ => {}, _ => {},
} }

View File

@ -21,7 +21,7 @@ impl Animation for RapidMeleeAnimation {
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_rapid_melee")] #[cfg_attr(feature = "be-dyn-lib", export_name = "character_rapid_melee")]
fn update_skeleton_inner( fn update_skeleton_inner(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(ability_id, stage_section, (current_strike, max_strikes), _ability_info): Self::Dependency< (ability_id, stage_section, (current_strike, _max_strikes), _ability_info): Self::Dependency<
'_, '_,
>, >,
anim_time: f32, anim_time: f32,
@ -39,7 +39,10 @@ impl Animation for RapidMeleeAnimation {
next.off_weapon_trail = true; next.off_weapon_trail = true;
match ability_id { match ability_id {
Some("common.abilities.sword.cleaving_whirlwind_slice") => { Some(
"common.abilities.sword.cleaving_whirlwind_slice"
| "common.abilities.sword.cleaving_bladestorm",
) => {
let (move1, move2, move3) = match stage_section { let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time, 0.0, 0.0), Some(StageSection::Buildup) => (anim_time, 0.0, 0.0),
Some(StageSection::Action) => (1.0, anim_time, 0.0), Some(StageSection::Action) => (1.0, anim_time, 0.0),
@ -92,16 +95,15 @@ impl Animation for RapidMeleeAnimation {
Some( Some(
"common.abilities.sword.agile_perforate" | "common.abilities.sword.agile_flurry", "common.abilities.sword.agile_perforate" | "common.abilities.sword.agile_flurry",
) => { ) => {
let (move1, move2, move3, move2alt) = match stage_section { let (move1, move2, move3) = 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) => ( Some(StageSection::Action) => (
1.0, 1.0,
anim_time.min(0.5).mul(2.0).powi(2) - anim_time.max(0.5).sub(0.5).mul(2.0), anim_time.min(0.5).mul(2.0).powi(2) - anim_time.max(0.5).sub(0.5).mul(2.0),
0.0, 0.0,
anim_time.powi(2),
), ),
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4), 1.0), Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
_ => (0.0, 0.0, 0.0, 0.0), _ => (0.0, 0.0, 0.0),
}; };
let pullback = 1.0 - move3; let pullback = 1.0 - move3;
let move1 = move1 * pullback; let move1 = move1 * pullback;
@ -131,6 +133,100 @@ impl Animation for RapidMeleeAnimation {
next.control.orientation.rotate_z(move2 * 1.2); next.control.orientation.rotate_z(move2 * 1.2);
next.control.position += Vec3::new(0.0, move2 * 12.0, 0.0); next.control.position += Vec3::new(0.0, move2 * 12.0, 0.0);
}, },
Some("common.abilities.sword.agile_hundred_cuts") => {
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.powf(0.25), 0.0),
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;
let (move2a, move2b, move2c, move2d) = match current_strike % 4 {
0 => (move2, 0.0, 0.0, 0.0),
1 => (1.0, move2, 0.0, 0.0),
2 => (1.0, 1.0, move2, 0.0),
3 => (1.0, 1.0, 1.0, move2),
_ => (0.0, 0.0, 0.0, 0.0),
};
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 * -12.0, -4.0 + move1 * 3.0, -2.0);
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.chest.orientation = Quaternion::rotation_z(move1 * 0.4);
next.head.orientation = Quaternion::rotation_z(move1 * -0.2);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.2);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.1);
next.control.orientation.rotate_y(move1 * -1.2);
next.control.position += Vec3::new(0.0, 0.0, move1 * 10.0);
next.chest.orientation.rotate_z(move2a * -0.2);
next.control.orientation.rotate_z(move2a * -2.0);
next.control.position += Vec3::new(move2a * 12.0, 0.0, move2a * -6.0);
next.chest.orientation.rotate_z(move2b * 0.2);
next.control.orientation.rotate_z(move2b * 2.9);
next.control.position += Vec3::new(move2b * -12.0, 0.0, 0.0);
next.chest.orientation.rotate_z(move2c * -0.2);
next.control.orientation.rotate_z(move2c * -2.3);
next.control.position += Vec3::new(move2c * 12.0, 0.0, move2c * 12.0);
next.chest.orientation.rotate_z(move2d * -0.2);
next.control.orientation.rotate_z(move2d * -2.7);
next.control.position += Vec3::new(move2d * 12.0, 0.0, move2a * -6.0);
},
Some("common.abilities.sword.crippling_mutilate") => {
let (move1, move2, move3) = match stage_section {
Some(StageSection::Buildup) => (anim_time.powf(0.25), 0.0, 0.0),
Some(StageSection::Action) => (
1.0,
if current_strike % 2 == 0 {
anim_time
} else {
1.0 - anim_time
},
0.0,
),
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 =
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 * -12.0, -4.0 + move1 * 3.0, -2.0);
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.chest.orientation = Quaternion::rotation_z(move1 * 0.7);
next.head.orientation = Quaternion::rotation_z(move1 * -0.4);
next.shorts.orientation = Quaternion::rotation_z(move1 * -0.5);
next.belt.orientation = Quaternion::rotation_z(move1 * -0.2);
next.control.orientation.rotate_x(move1 * -0.6);
next.control.orientation.rotate_z(move1 * -0.7);
next.control.position += Vec3::new(move1 * 1.0, move1 * -4.0, move1 * 4.0);
next.chest.orientation.rotate_z(move2 * -1.2);
next.head.orientation.rotate_z(move2 * 0.6);
next.belt.orientation.rotate_z(move2 * 0.3);
next.shorts.orientation.rotate_z(move2 * 0.7);
next.control.orientation.rotate_z(move2 * 1.2);
next.control.position += Vec3::new(0.0, move2 * 14.0, move2 * 12.0);
},
_ => {}, _ => {},
} }