mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'tursus_werewolf_anim&spawn_loot_tweaks' into 'master'
spawn and loot tweaks, tursus and werewolf anims See merge request veloren/veloren!3790
This commit is contained in:
commit
01da8b6a82
@ -211,6 +211,11 @@
|
||||
secondary: "common.abilities.custom.beastclaws.basic",
|
||||
abilities: [],
|
||||
),
|
||||
Custom("Tursus Claws"): (
|
||||
primary: "common.abilities.custom.tursus_claws.basic",
|
||||
secondary: "common.abilities.custom.tursus_claws.basic",
|
||||
abilities: [],
|
||||
),
|
||||
Custom("Wendigo Magic"): (
|
||||
primary: "common.abilities.custom.wendigomagic.frostbomb",
|
||||
secondary: "common.abilities.custom.wendigomagic.singlestrike",
|
||||
|
17
assets/common/abilities/custom/tursus_claws/basic.ron
Normal file
17
assets/common/abilities/custom/tursus_claws/basic.ron
Normal file
@ -0,0 +1,17 @@
|
||||
BasicMelee(
|
||||
energy_cost: 0,
|
||||
buildup_duration: 0.5,
|
||||
swing_duration: 0.1,
|
||||
recover_duration: 0.5,
|
||||
melee_constructor: (
|
||||
kind: Slash(
|
||||
damage: 40.0,
|
||||
poise: 40.0,
|
||||
knockback: 25.0,
|
||||
energy_regen: 0.0,
|
||||
),
|
||||
range: 5.0,
|
||||
angle: 120.0,
|
||||
),
|
||||
ori_modifier: 1.0,
|
||||
)
|
@ -3,7 +3,7 @@
|
||||
name: Automatic,
|
||||
body: RandomWith("axebeak"),
|
||||
alignment: Alignment(Enemy),
|
||||
loot: LootTable("common.loot_tables.creature.theropod.horned"),
|
||||
loot: LootTable("common.loot_tables.creature.theropod.axebeak"),
|
||||
inventory: (
|
||||
loadout: FromBody,
|
||||
),
|
||||
|
@ -3,7 +3,7 @@
|
||||
name: Automatic,
|
||||
body: RandomWith("bristleback"),
|
||||
alignment: Alignment(Enemy),
|
||||
loot: LootTable("common.loot_tables.creature.quad_medium.generic"),
|
||||
loot: LootTable("common.loot_tables.creature.quad_medium.tuskram"),
|
||||
inventory: (
|
||||
loadout: FromBody,
|
||||
),
|
||||
|
@ -3,7 +3,7 @@
|
||||
name: Automatic,
|
||||
body: RandomWith("tursus"),
|
||||
alignment: Alignment(Enemy),
|
||||
loot: LootTable("common.loot_tables.creature.biped_large.default"),
|
||||
loot: LootTable("common.loot_tables.creature.biped_large.tursus"),
|
||||
inventory: (
|
||||
loadout: FromBody,
|
||||
),
|
||||
|
21
assets/common/items/npc_weapons/unique/akhlut.ron
Normal file
21
assets/common/items/npc_weapons/unique/akhlut.ron
Normal file
@ -0,0 +1,21 @@
|
||||
ItemDef(
|
||||
name: "Quad Med Basic",
|
||||
description: "testing123",
|
||||
kind: Tool((
|
||||
kind: Natural,
|
||||
hands: Two,
|
||||
stats: (
|
||||
equip_time_secs: 0.01,
|
||||
power: 1.25,
|
||||
effect_power: 1.0,
|
||||
speed: 1.0,
|
||||
crit_chance: 0.0625,
|
||||
range: 1.0,
|
||||
energy_efficiency: 1.0,
|
||||
buff_strength: 1.0,
|
||||
),
|
||||
)),
|
||||
quality: Low,
|
||||
tags: [],
|
||||
ability_spec: Some(Custom("Quad Med Basic")),
|
||||
)
|
21
assets/common/items/npc_weapons/unique/tursus_claws.ron
Normal file
21
assets/common/items/npc_weapons/unique/tursus_claws.ron
Normal file
@ -0,0 +1,21 @@
|
||||
ItemDef(
|
||||
name: "Tursus Claws",
|
||||
description: "Was attached to a beast.",
|
||||
kind: Tool((
|
||||
kind: Natural,
|
||||
hands: Two,
|
||||
stats: (
|
||||
equip_time_secs: 0.5,
|
||||
power: 1.0,
|
||||
effect_power: 1.0,
|
||||
speed: 1.0,
|
||||
crit_chance: 0.0625,
|
||||
range: 1.0,
|
||||
energy_efficiency: 1.0,
|
||||
buff_strength: 1.0,
|
||||
),
|
||||
)),
|
||||
quality: Low,
|
||||
tags: [],
|
||||
ability_spec: Some(Custom("Tursus Claws")),
|
||||
)
|
@ -0,0 +1,4 @@
|
||||
[
|
||||
(1.0, Item("common.items.crafting_ing.hide.rugged_hide")),
|
||||
(1.0, ItemQuantity("common.items.crafting_ing.animal_misc.long_tusk", 1, 2)),
|
||||
]
|
5
assets/common/loot_tables/creature/theropod/axebeak.ron
Normal file
5
assets/common/loot_tables/creature/theropod/axebeak.ron
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
(4.0, ItemQuantity("common.items.crafting_ing.animal_misc.elegant_crest", 3, 6)),
|
||||
(1.0, Item("common.items.crafting_ing.animal_misc.raptor_feather")),
|
||||
(0.5, Item("common.items.weapons.hammer.burnt_drumstick")),
|
||||
]
|
@ -1429,19 +1429,19 @@
|
||||
),
|
||||
(Tursus, Male): (
|
||||
shoulder_l: (
|
||||
offset: (-4.5, -4.0, -8.0),
|
||||
offset: (-5.0, -3.5, -5.0),
|
||||
lateral: ("npc.tursus.male.shoulder_l"),
|
||||
),
|
||||
shoulder_r: (
|
||||
offset: (-4.5, -4.0, -8.0),
|
||||
offset: (-5.0, -3.5, -5.0),
|
||||
lateral: ("npc.tursus.male.shoulder_r"),
|
||||
),
|
||||
hand_l: (
|
||||
offset: (-5.5, -3.5, -15.0),
|
||||
offset: (-6.0, -3.5, -16.0),
|
||||
lateral: ("npc.tursus.male.hand_l"),
|
||||
),
|
||||
hand_r: (
|
||||
offset: (-5.5, -3.5, -15.0),
|
||||
offset: (-6.0, -3.5, -16.0),
|
||||
lateral: ("npc.tursus.male.hand_r"),
|
||||
),
|
||||
leg_l: (
|
||||
@ -1462,20 +1462,20 @@
|
||||
),
|
||||
),
|
||||
(Tursus, Female): (
|
||||
shoulder_l: (
|
||||
offset: (-4.5, -4.0, -8.0),
|
||||
shoulder_l: (
|
||||
offset: (-5.0, -3.5, -5.0),
|
||||
lateral: ("npc.tursus.male.shoulder_l"),
|
||||
),
|
||||
shoulder_r: (
|
||||
offset: (-4.5, -4.0, -8.0),
|
||||
offset: (-5.0, -3.5, -5.0),
|
||||
lateral: ("npc.tursus.male.shoulder_r"),
|
||||
),
|
||||
hand_l: (
|
||||
offset: (-5.5, -3.5, -15.0),
|
||||
offset: (-6.0, -3.5, -16.0),
|
||||
lateral: ("npc.tursus.male.hand_l"),
|
||||
),
|
||||
hand_r: (
|
||||
offset: (-5.5, -3.5, -15.0),
|
||||
offset: (-6.0, -3.5, -16.0),
|
||||
lateral: ("npc.tursus.male.hand_r"),
|
||||
),
|
||||
leg_l: (
|
||||
|
@ -1622,6 +1622,10 @@
|
||||
vox_spec: ("armor.empty", (0.0, 0.0, 0.0)),
|
||||
color: None
|
||||
),
|
||||
Tool("common.items.npc_weapons.unique.tursus_claws"): (
|
||||
vox_spec: ("armor.empty", (0.0, 0.0, 0.0)),
|
||||
color: None
|
||||
),
|
||||
Tool("common.items.npc_weapons.unique.wendigo_magic"): (
|
||||
vox_spec: ("armor.empty", (0.0, 0.0, 0.0)),
|
||||
color: None
|
||||
|
@ -11,8 +11,10 @@ SpawnEntry (
|
||||
),
|
||||
Pack(
|
||||
groups: [
|
||||
(2, (4, 12, "common.entity.wild.peaceful.penguin")),
|
||||
(2, (4, 8, "common.entity.wild.peaceful.seal")),
|
||||
(4, (4, 12, "common.entity.wild.peaceful.penguin")),
|
||||
(4, (4, 8, "common.entity.wild.peaceful.seal")),
|
||||
(1, (1, 1, "common.entity.wild.aggressive.tursus")),
|
||||
(1, (1, 1, "common.entity.wild.aggressive.akhlut")),
|
||||
],
|
||||
spawn_mode: Ice,
|
||||
day_period: [Night, Morning, Noon, Evening],
|
||||
|
@ -10,6 +10,7 @@ SpawnEntry (
|
||||
(1, (1, 1, "common.entity.wild.peaceful.moose")),
|
||||
(1, (1, 1, "common.entity.wild.peaceful.arctic_hare")),
|
||||
(1, (1, 1, "common.entity.wild.peaceful.tuskram")),
|
||||
(1, (1, 1, "common.entity.wild.aggressive.bristleback")),
|
||||
(1, (1, 4, "common.entity.wild.peaceful.crow")),
|
||||
],
|
||||
spawn_mode: Land,
|
||||
|
@ -43,7 +43,6 @@ SpawnEntry (
|
||||
(1, (1, 1, "common.entity.wild.aggressive.batfox")),
|
||||
(5, (1, 1, "common.entity.wild.peaceful.forest_fox")),
|
||||
(5, (1, 1, "common.entity.wild.peaceful.raccoon")),
|
||||
(3, (1, 1, "common.entity.wild.aggressive.bristleback")),
|
||||
// Pack
|
||||
(5, (1, 3, "common.entity.wild.peaceful.rat")),
|
||||
(5, (1, 3, "common.entity.wild.peaceful.squirrel")),
|
||||
|
@ -570,6 +570,9 @@ fn default_main_tool(body: &Body) -> Item {
|
||||
| quadruped_medium::Species::Yak => Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadmedbasicgentle",
|
||||
)),
|
||||
quadruped_medium::Species::Akhlut => Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.akhlut",
|
||||
)),
|
||||
_ => Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.quadmedbasic",
|
||||
)),
|
||||
@ -688,7 +691,7 @@ fn default_main_tool(body: &Body) -> Item {
|
||||
"common.items.npc_weapons.unique.beast_claws",
|
||||
)),
|
||||
(biped_large::Species::Tursus, _) => Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.unique.beast_claws",
|
||||
"common.items.npc_weapons.unique.tursus_claws",
|
||||
)),
|
||||
(biped_large::Species::Cyclops, _) => Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.hammer.cyclops_hammer",
|
||||
|
@ -12,7 +12,7 @@ pub struct AlphaAnimation;
|
||||
|
||||
impl Animation for AlphaAnimation {
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Option<ToolKind>,
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
@ -30,7 +30,7 @@ impl Animation for AlphaAnimation {
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
_second_tool,
|
||||
velocity,
|
||||
global_time,
|
||||
@ -146,7 +146,7 @@ impl Animation for AlphaAnimation {
|
||||
* Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
|
||||
},
|
||||
Some(ToolKind::Axe) => match ability_id {
|
||||
Some("common.abilities.custom.gigas_frost.combomelee") => {
|
||||
Some("common.abilities.custom.gigas_frost.cleave") => {
|
||||
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
|
||||
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
|
||||
|
||||
@ -230,267 +230,334 @@ impl Animation for AlphaAnimation {
|
||||
* Quaternion::rotation_z(move1 * -1.0 + move2 * -1.5);
|
||||
},
|
||||
},
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Wendigo Magic" => {
|
||||
next.torso.position = Vec3::new(0.0, 0.0, move1 * -2.18);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4);
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.wendigomagic.singlestrike") => {
|
||||
next.torso.position = Vec3::new(0.0, 0.0, move1 * -2.18);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4);
|
||||
|
||||
next.control_l.position = Vec3::new(
|
||||
-9.0 + move2 * 6.0,
|
||||
19.0 + move1 * 6.0,
|
||||
-13.0 + move1 * 10.5,
|
||||
);
|
||||
next.control_r.position = Vec3::new(
|
||||
9.0 + move2 * -6.0,
|
||||
19.0 + move1 * 6.0,
|
||||
-13.0 + move1 * 14.5,
|
||||
);
|
||||
next.control_l.position =
|
||||
Vec3::new(-9.0 + move2 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5);
|
||||
next.control_r.position =
|
||||
Vec3::new(9.0 + move2 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(-0.15)
|
||||
* Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(0.15)
|
||||
* Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.3);
|
||||
},
|
||||
"Tidal Warrior" => {
|
||||
if mirror > 0.0 {
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * 0.75);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * 0.7)
|
||||
* Quaternion::rotation_z(move1 * -1.0 + move2 * 1.3);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * -0.7)
|
||||
* Quaternion::rotation_y(move1 * -0.5 + move2 * 0.7)
|
||||
* Quaternion::rotation_z(move1 * 1.0 + move2 * -1.2);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(-0.15)
|
||||
* Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(0.15)
|
||||
* Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.3);
|
||||
},
|
||||
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.3 + move2 * 0.8)
|
||||
* Quaternion::rotation_y(move1 * -0.3 + move2 * -0.5);
|
||||
next.hand_l.position = Vec3::new(
|
||||
-14.0 + move1 * -2.0 + move2 * 4.0,
|
||||
2.0 + move2 * 4.0,
|
||||
-4.0 + move2 * 3.0,
|
||||
);
|
||||
Some("common.abilities.custom.tidalwarrior.pincer") => {
|
||||
if mirror > 0.0 {
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * 0.75);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * 0.7)
|
||||
* Quaternion::rotation_z(move1 * -1.0 + move2 * 1.3);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * -0.7)
|
||||
* Quaternion::rotation_y(move1 * -0.5 + move2 * 0.7)
|
||||
* Quaternion::rotation_z(move1 * 1.0 + move2 * -1.2);
|
||||
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2 * 1.5)
|
||||
* Quaternion::rotation_y(move2 * 0.5)
|
||||
* Quaternion::rotation_z(
|
||||
-0.35 + move1 * -0.5 + move2 * 1.0,
|
||||
);
|
||||
next.hand_r.position = Vec3::new(14.0, 2.0, -4.0);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.3 + move2 * 0.8)
|
||||
* Quaternion::rotation_y(move1 * -0.3 + move2 * -0.5);
|
||||
next.hand_l.position = Vec3::new(
|
||||
-14.0 + move1 * -2.0 + move2 * 4.0,
|
||||
2.0 + move2 * 4.0,
|
||||
-4.0 + move2 * 3.0,
|
||||
);
|
||||
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(0.35);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 3.0 + move2 * 1.5)
|
||||
* Quaternion::rotation_y(move2 * 0.5)
|
||||
* Quaternion::rotation_z(-0.35 + move1 * -0.5 + move2 * 1.0);
|
||||
next.hand_r.position = Vec3::new(14.0, 2.0, -4.0);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
} else {
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * -0.75);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * 0.7)
|
||||
* Quaternion::rotation_z(move1 * 1.0 + move2 * -1.3);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * -0.7)
|
||||
* Quaternion::rotation_y(move1 * 0.5 + move2 * -0.7)
|
||||
* Quaternion::rotation_z(move1 * -1.0 + move2 * 1.2);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(0.35);
|
||||
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.3 + move2 * 0.8)
|
||||
* Quaternion::rotation_y(move1 * 0.3 + move2 * 0.5);
|
||||
next.hand_r.position = Vec3::new(
|
||||
14.0 + move1 * 2.0 + move2 * -4.0,
|
||||
2.0 + move2 * 4.0,
|
||||
-4.0 + move2 * 3.0,
|
||||
);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(0.0);
|
||||
} else {
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * -0.75);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * 0.7)
|
||||
* Quaternion::rotation_z(move1 * 1.0 + move2 * -1.3);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * -0.7)
|
||||
* Quaternion::rotation_y(move1 * 0.5 + move2 * -0.7)
|
||||
* Quaternion::rotation_z(move1 * -1.0 + move2 * 1.2);
|
||||
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2 * 1.5)
|
||||
* Quaternion::rotation_y(move2 * -0.5)
|
||||
* Quaternion::rotation_z(0.35 + move1 * 0.5 + move2 * -1.0);
|
||||
next.hand_l.position = Vec3::new(-14.0, 2.0, -4.0);
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.3 + move2 * 0.8)
|
||||
* Quaternion::rotation_y(move1 * 0.3 + move2 * 0.5);
|
||||
next.hand_r.position = Vec3::new(
|
||||
14.0 + move1 * 2.0 + move2 * -4.0,
|
||||
2.0 + move2 * 4.0,
|
||||
-4.0 + move2 * 3.0,
|
||||
);
|
||||
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 3.0)
|
||||
* Quaternion::rotation_z(-0.35);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(PI / 3.0 + move2 * 1.5)
|
||||
* Quaternion::rotation_y(move2 * -0.5)
|
||||
* Quaternion::rotation_z(0.35 + move1 * 0.5 + move2 * -1.0);
|
||||
next.hand_l.position = Vec3::new(-14.0, 2.0, -4.0);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
};
|
||||
next.torso.position = Vec3::new(0.0, move2 * -10.35, move2 * -4.7);
|
||||
},
|
||||
"Minotaur" => {
|
||||
next.control_l.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.control_r.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.weapon_l.position = Vec3::new(
|
||||
-12.0 + move1 * -9.0 + move2 * 16.0,
|
||||
-6.0 + move2 * 8.0,
|
||||
-18.0 + move1 * 8.0 + move2 * -4.0,
|
||||
);
|
||||
next.weapon_r.position = Vec3::new(
|
||||
12.0 + move1 * 9.0 + move2 * -16.0,
|
||||
-6.0 + move2 * 8.0,
|
||||
-18.0 + move1 * 8.0 + move2 * -8.0,
|
||||
);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(-0.35);
|
||||
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-1.67)
|
||||
* Quaternion::rotation_y(move1 * -0.3 + move2 * 1.0)
|
||||
* Quaternion::rotation_z(move1 * 0.8 + move2 * -1.8);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-1.67)
|
||||
* Quaternion::rotation_y(move1 * 0.3 + move2 * -0.6)
|
||||
* Quaternion::rotation_z(move1 * -0.8 + move2 * 1.8);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(0.0);
|
||||
};
|
||||
next.torso.position = Vec3::new(0.0, move2 * -10.35, move2 * -4.7);
|
||||
},
|
||||
Some("common.abilities.custom.minotaur.cripplingstrike") => {
|
||||
next.control_l.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.control_r.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.weapon_l.position = Vec3::new(
|
||||
-12.0 + move1 * -9.0 + move2 * 16.0,
|
||||
-6.0 + move2 * 8.0,
|
||||
-18.0 + move1 * 8.0 + move2 * -4.0,
|
||||
);
|
||||
next.weapon_r.position = Vec3::new(
|
||||
12.0 + move1 * 9.0 + move2 * -16.0,
|
||||
-6.0 + move2 * 8.0,
|
||||
-18.0 + move1 * 8.0 + move2 * -8.0,
|
||||
);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-1.67)
|
||||
* Quaternion::rotation_y(move1 * -0.3 + move2 * 1.0)
|
||||
* Quaternion::rotation_z(move1 * 0.8 + move2 * -1.8);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-1.67)
|
||||
* Quaternion::rotation_y(move1 * 0.3 + move2 * -0.6)
|
||||
* Quaternion::rotation_z(move1 * -0.8 + move2 * 1.8);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(move1 * 0.7 + move2 * -0.7);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 1.0);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(move1 * -0.7 + move2 * 0.7);
|
||||
next.second.scale = Vec3::one() * 1.0;
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.6 + move2 * 0.4)
|
||||
},
|
||||
"Yeti" => {
|
||||
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
|
||||
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(move1 * 0.7 + move2 * -0.7);
|
||||
|
||||
next.control.position = Vec3::new(
|
||||
4.0 + move1 * -12.0 + move2 * 20.0,
|
||||
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
|
||||
(-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
|
||||
);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
|
||||
* Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(-0.3)
|
||||
* Quaternion::rotation_y(move1 * -0.7 + move2 * 0.7);
|
||||
next.second.scale = Vec3::one() * 1.0;
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * -0.6 + move2 * 0.4)
|
||||
},
|
||||
Some("common.abilities.custom.yeti.strike") => {
|
||||
next.control_l.position = Vec3::new(-1.0, 2.0, 12.0 + move2 * -10.0);
|
||||
next.control_r.position = Vec3::new(1.0, 2.0, -2.0);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
|
||||
* Quaternion::rotation_y(-0.0);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.control.position = Vec3::new(
|
||||
4.0 + move1 * -12.0 + move2 * 20.0,
|
||||
(s_a.grip.0 / 1.0) + move1 * -3.0 + move2 * 5.0,
|
||||
(-s_a.grip.0 / 0.8) + move1 * -2.0 + move2 * 8.0,
|
||||
);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * -0.25)
|
||||
* Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.2 + move2 * -0.4);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.2 + move2 * 0.2);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
|
||||
* Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
|
||||
* Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
|
||||
},
|
||||
"Harvester" => {
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.25 + move2 * 0.25)
|
||||
* Quaternion::rotation_z(move1 * -0.3 + move2 * 0.4);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move2 * 0.8)
|
||||
* Quaternion::rotation_y(-0.0);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + 0.2 + move2 * 0.8)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1 + move2 * -0.5);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.15);
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(-1.0 + move1 * -0.5 + move2 * -0.3)
|
||||
* Quaternion::rotation_y(-1.8 + move1 * -0.8 + move2 * 3.0)
|
||||
* Quaternion::rotation_z(move1 * -0.8 + move2 * -0.8);
|
||||
},
|
||||
Some("common.abilities.custom.harvester.scythe") => {
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * -0.25 + move2 * 0.25)
|
||||
* Quaternion::rotation_z(move1 * -0.3 + move2 * 0.4);
|
||||
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * -0.2)
|
||||
* Quaternion::rotation_z(move1 * -1.0 + move2 * 1.0);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1 + move2 * -0.5);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.15);
|
||||
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-s_a.shoulder.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2 - foothorir * 1.0,
|
||||
);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.4 + move1 * 1.0 + move2 * -1.0)
|
||||
* Quaternion::rotation_y(move1 * -0.2);
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_y(0.4 + move1 * -0.8 + move2 * 0.8)
|
||||
* Quaternion::rotation_x(0.4 + move1 * -0.4 + move2 * 0.8);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * -0.2)
|
||||
* Quaternion::rotation_z(move1 * -1.0 + move2 * 1.0);
|
||||
|
||||
if speed == 0.0 {
|
||||
next.leg_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.4 + move2 * -0.4);
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-s_a.shoulder.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2 - foothorir * 1.0,
|
||||
);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.4 + move1 * 1.0 + move2 * -1.0)
|
||||
* Quaternion::rotation_y(move1 * -0.2);
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_y(0.4 + move1 * -0.8 + move2 * 0.8)
|
||||
* Quaternion::rotation_x(0.4 + move1 * -0.4 + move2 * 0.8);
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1,
|
||||
s_a.foot.2 + move1 * 2.0 + move2 * -2.0,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
|
||||
}
|
||||
if speed == 0.0 {
|
||||
next.leg_l.orientation = Quaternion::rotation_x(move1 * 0.4 + move2 * -0.4);
|
||||
|
||||
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
|
||||
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
|
||||
|
||||
next.control.position = Vec3::new(
|
||||
-7.0 + move1 * 26.0 - move2 * 32.0,
|
||||
0.0 + s_a.grip.0 / 1.0 - move1 * 4.0,
|
||||
-s_a.grip.0 / 0.8,
|
||||
);
|
||||
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_y(-0.0)
|
||||
* Quaternion::rotation_z(PI);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
|
||||
* Quaternion::rotation_y(-1.0 + move1 * 1.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
|
||||
next.control.orientation = Quaternion::rotation_x(-1.4 + move1 * -0.4)
|
||||
* Quaternion::rotation_y(-2.8 + move1 * 3.0 + move2 * -3.0)
|
||||
* Quaternion::rotation_z(move1 * -1.5);
|
||||
},
|
||||
"Husk Brute" => {
|
||||
next.shoulder_l.position =
|
||||
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.shoulder_r.position =
|
||||
Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2);
|
||||
next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2);
|
||||
|
||||
if mirror > 0.0 {
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * -0.6);
|
||||
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
|
||||
|
||||
next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
|
||||
* Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
|
||||
|
||||
next.hand_r.orientation = Quaternion::rotation_z(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * 0.8 + move2 * -1.2);
|
||||
} else {
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
|
||||
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
|
||||
|
||||
next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
|
||||
* Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
|
||||
|
||||
next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * -0.8 + move2 * 1.2);
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1,
|
||||
s_a.foot.2 + move1 * 2.0 + move2 * -2.0,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
|
||||
}
|
||||
}
|
||||
|
||||
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
|
||||
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
|
||||
|
||||
next.control.position = Vec3::new(
|
||||
-7.0 + move1 * 26.0 - move2 * 32.0,
|
||||
0.0 + s_a.grip.0 / 1.0 - move1 * 4.0,
|
||||
-s_a.grip.0 / 0.8,
|
||||
);
|
||||
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0)
|
||||
* Quaternion::rotation_y(-0.0)
|
||||
* Quaternion::rotation_z(PI);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
|
||||
* Quaternion::rotation_y(-1.0 + move1 * 1.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
|
||||
next.control.orientation = Quaternion::rotation_x(-1.4 + move1 * -0.4)
|
||||
* Quaternion::rotation_y(-2.8 + move1 * 3.0 + move2 * -3.0)
|
||||
* Quaternion::rotation_z(move1 * -1.5);
|
||||
},
|
||||
Some("common.abilities.custom.husk.singlestrike") => {
|
||||
next.shoulder_l.position =
|
||||
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.shoulder_r.position =
|
||||
Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2);
|
||||
next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2);
|
||||
|
||||
if mirror > 0.0 {
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * -0.6);
|
||||
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
|
||||
|
||||
next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
|
||||
* Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
|
||||
|
||||
next.hand_r.orientation = Quaternion::rotation_z(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * 0.8 + move2 * -1.2);
|
||||
} else {
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
|
||||
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
|
||||
|
||||
next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
|
||||
* Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
|
||||
|
||||
next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * -0.8 + move2 * 1.2);
|
||||
}
|
||||
},
|
||||
Some("common.abilities.custom.beastclaws.basic") => {
|
||||
next.shoulder_l.position =
|
||||
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.shoulder_r.position =
|
||||
Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.hand_l.position =
|
||||
Vec3::new(-s_a.hand.0 - 3.0, s_a.hand.1 + 4.5, s_a.hand.2 + 0.0);
|
||||
next.hand_r.position =
|
||||
Vec3::new(s_a.hand.0 + 3.0, s_a.hand.1 + 4.5, s_a.hand.2 + 0.0);
|
||||
|
||||
if mirror > 0.0 {
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * 0.5 + move2 * -1.0);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.6);
|
||||
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
|
||||
|
||||
next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
|
||||
* Quaternion::rotation_y(move1 * 0.2 + move2 * -0.5)
|
||||
* Quaternion::rotation_z(move1 * 2.0);
|
||||
|
||||
next.hand_r.orientation = Quaternion::rotation_z(move1 * -2.0)
|
||||
* Quaternion::rotation_y(move1 * 0.8 + move2 * -0.6);
|
||||
} else {
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * -0.5 + move2 * 1.0);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
|
||||
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
|
||||
|
||||
next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
|
||||
* Quaternion::rotation_y(move1 * -0.3 + move2 * 0.5)
|
||||
* Quaternion::rotation_z(move1 * -2.0);
|
||||
|
||||
next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * -0.8 + move2 * 0.6);
|
||||
}
|
||||
},
|
||||
Some("common.abilities.custom.tursus_claws.basic") => {
|
||||
next.shoulder_l.position =
|
||||
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.shoulder_r.position =
|
||||
Vec3::new(s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + 4.0);
|
||||
next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + 4.0);
|
||||
|
||||
if mirror > 0.0 {
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.6);
|
||||
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.4 + move2 * -1.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.2 + move2 * 0.6);
|
||||
|
||||
next.hand_l.orientation = Quaternion::rotation_x(move1 * 1.2)
|
||||
* Quaternion::rotation_y(move1 * 1.0 + move2 * -2.0);
|
||||
|
||||
next.hand_r.orientation = Quaternion::rotation_z(move1 * -1.0)
|
||||
* Quaternion::rotation_y(move1 * 0.8 + move2 * -1.2);
|
||||
} else {
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.6);
|
||||
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * -0.4 + move2 * 1.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(move1 * 0.2 + move2 * -0.6);
|
||||
|
||||
next.hand_r.orientation = Quaternion::rotation_x(move1 * 1.2)
|
||||
* Quaternion::rotation_y(move1 * -1.0 + move2 * 2.0);
|
||||
|
||||
next.hand_l.orientation = Quaternion::rotation_z(move1 * 1.0)
|
||||
* Quaternion::rotation_y(move1 * -0.8 + move2 * 1.2);
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -12,13 +12,14 @@ pub struct BeamAnimation;
|
||||
|
||||
impl Animation for BeamAnimation {
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Option<ToolKind>,
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
f32,
|
||||
Vec3<f32>,
|
||||
Option<StageSection>,
|
||||
f32,
|
||||
f32,
|
||||
Option<&'a str>,
|
||||
);
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
@ -29,13 +30,14 @@ impl Animation for BeamAnimation {
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
_second_tool_kind,
|
||||
global_time,
|
||||
velocity,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
timer,
|
||||
ability_id,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
@ -123,162 +125,147 @@ impl Animation for BeamAnimation {
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + 0.3 + 0.6 * speednorm + (footrotl * -0.2));
|
||||
},
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Tidal Warrior" => {
|
||||
if mirror > 0.0 {
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * -0.6);
|
||||
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6);
|
||||
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6);
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.tidalwarrior.bubbles") => {
|
||||
if mirror > 0.0 {
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * -0.6);
|
||||
next.upper_torso.orientation = Quaternion::rotation_z(move1 * 0.6);
|
||||
next.lower_torso.orientation = Quaternion::rotation_z(move1 * -0.6);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_z(move1 * 0.3);
|
||||
next.hand_l.position = Vec3::new(-14.0 + move1 * 3.0, 2.0, -4.0);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_z(move1 * 0.3);
|
||||
next.hand_l.position = Vec3::new(-14.0 + move1 * 3.0, 2.0, -4.0);
|
||||
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2shake * -0.07)
|
||||
* Quaternion::rotation_y(move1 * -0.5)
|
||||
* Quaternion::rotation_z(-0.35 + move2shake * 0.07);
|
||||
next.hand_r.position = Vec3::new(14.0 + move1 - 3.0, 2.0, -4.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2shake * -0.07)
|
||||
* Quaternion::rotation_y(move1 * -0.5)
|
||||
* Quaternion::rotation_z(-0.35 + move2shake * 0.07);
|
||||
next.hand_r.position = Vec3::new(14.0 + move1 - 3.0, 2.0, -4.0);
|
||||
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2shake * 0.07)
|
||||
* Quaternion::rotation_y(move1 * -0.5)
|
||||
* Quaternion::rotation_z(0.35 - move2shake * 0.07);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2shake * 0.07)
|
||||
* Quaternion::rotation_y(move1 * -0.5)
|
||||
* Quaternion::rotation_z(0.35 - move2shake * 0.07);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_z(move1 * -0.3);
|
||||
} else {
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * 0.6);
|
||||
next.upper_torso.orientation = Quaternion::rotation_z(move1 * -0.6);
|
||||
next.lower_torso.orientation = Quaternion::rotation_z(move1 * 0.6);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_z(move1 * -0.3);
|
||||
} else {
|
||||
next.head.orientation = Quaternion::rotation_z(move1 * 0.6);
|
||||
next.upper_torso.orientation = Quaternion::rotation_z(move1 * -0.6);
|
||||
next.lower_torso.orientation = Quaternion::rotation_z(move1 * 0.6);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_z(move1 * -0.3);
|
||||
next.hand_l.position = Vec3::new(-14.0 + move1 * 3.0, 2.0, -4.0);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_z(move1 * -0.3);
|
||||
next.hand_l.position = Vec3::new(-14.0 + move1 * 3.0, 2.0, -4.0);
|
||||
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2shake * 0.07)
|
||||
* Quaternion::rotation_y(move1 * 0.5)
|
||||
* Quaternion::rotation_z(-0.35 + move2shake * 0.07);
|
||||
next.hand_r.position = Vec3::new(14.0 + move1 - 3.0, 2.0, -4.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2shake * 0.07)
|
||||
* Quaternion::rotation_y(move1 * 0.5)
|
||||
* Quaternion::rotation_z(-0.35 + move2shake * 0.07);
|
||||
next.hand_r.position = Vec3::new(14.0 + move1 - 3.0, 2.0, -4.0);
|
||||
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2shake * -0.07)
|
||||
* Quaternion::rotation_y(move1 * 0.5)
|
||||
* Quaternion::rotation_z(0.35 - move2shake * -0.07);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move2shake * -0.07)
|
||||
* Quaternion::rotation_y(move1 * 0.5)
|
||||
* Quaternion::rotation_z(0.35 - move2shake * -0.07);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_z(move1 * 0.3);
|
||||
};
|
||||
},
|
||||
"Yeti" => {
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_z(move1 * 0.3);
|
||||
};
|
||||
},
|
||||
Some("common.abilities.custom.yeti.frostbreath") => {
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(
|
||||
move1 * 0.5 + move2 * -0.5 + move2shake * -0.02,
|
||||
);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation =
|
||||
Quaternion::rotation_x(move2 * -0.5 + move2shake * -0.1);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.5 + move2 * -0.5 + move2shake * -0.02);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.5 + move2shake * -0.1);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
|
||||
next.weapon_l.position = Vec3::new(-12.0, -1.0, -15.0);
|
||||
next.weapon_r.position = Vec3::new(12.0, -1.0, -15.0);
|
||||
next.weapon_l.position = Vec3::new(-12.0, -1.0, -15.0);
|
||||
next.weapon_r.position = Vec3::new(12.0, -1.0, -15.0);
|
||||
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
|
||||
|
||||
next.arm_control_r.orientation =
|
||||
Quaternion::rotation_x(move1 * 1.1 + move2 * -1.6)
|
||||
* Quaternion::rotation_y(move1 * 1.4 + move2 * -1.8);
|
||||
next.arm_control_r.orientation =
|
||||
Quaternion::rotation_x(move1 * 1.1 + move2 * -1.6)
|
||||
* Quaternion::rotation_y(move1 * 1.4 + move2 * -1.8);
|
||||
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 1.4 + move2 * -1.8);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 1.4 + move2 * -1.8);
|
||||
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(move1 * 1.4 + move2 * -1.8);
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(move1 * 1.4 + move2 * -1.8);
|
||||
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.upper_torso.0,
|
||||
s_a.upper_torso.1 + move1 * -1.9 + move2 * 1.2,
|
||||
);
|
||||
next.upper_torso.orientation = Quaternion::rotation_x(
|
||||
move1 * 0.8 + move2 * -1.1 + move2shake * -0.02,
|
||||
);
|
||||
next.lower_torso.position =
|
||||
Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1);
|
||||
next.lower_torso.orientation = Quaternion::rotation_x(
|
||||
move1 * -0.8 + move2 * 1.1 + move2shake * 0.02,
|
||||
);
|
||||
},
|
||||
"Harvester" => {
|
||||
next.head.orientation = Quaternion::rotation_x(
|
||||
move1 * 0.5 + move2 * -0.4 + move2shake * -0.02,
|
||||
);
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.upper_torso.0,
|
||||
s_a.upper_torso.1 + move1 * -1.9 + move2 * 1.2,
|
||||
);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1 + move2shake * -0.02);
|
||||
next.lower_torso.position =
|
||||
Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1 + move2shake * 0.02);
|
||||
},
|
||||
Some("common.abilities.custom.harvester.firebreath") => {
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.5 + move2 * -0.4 + move2shake * -0.02);
|
||||
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation =
|
||||
Quaternion::rotation_x(move2 * -0.5 + move2shake * -0.1);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.5 + move2shake * -0.1);
|
||||
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.upper_torso.0 + move1 * -3.0 + move2 * 3.0,
|
||||
s_a.upper_torso.1 + move1 * -0.4,
|
||||
);
|
||||
next.upper_torso.orientation = Quaternion::rotation_x(
|
||||
move1 * 0.8 + move2 * -1.1 + move2shake * -0.02,
|
||||
);
|
||||
next.lower_torso.position =
|
||||
Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1);
|
||||
next.lower_torso.orientation = Quaternion::rotation_x(
|
||||
move1 * -0.8 + move2 * 1.1 + move2shake * 0.02,
|
||||
);
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.upper_torso.0 + move1 * -3.0 + move2 * 3.0,
|
||||
s_a.upper_torso.1 + move1 * -0.4,
|
||||
);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1 + move2shake * -0.02);
|
||||
next.lower_torso.position =
|
||||
Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1 + move2shake * 0.02);
|
||||
|
||||
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
|
||||
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
|
||||
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
|
||||
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
|
||||
|
||||
next.control.position =
|
||||
Vec3::new(-6.0, 0.0 + s_a.grip.0 / 1.0, -s_a.grip.0 / 0.8);
|
||||
next.control.position =
|
||||
Vec3::new(-6.0, 0.0 + s_a.grip.0 / 1.0, -s_a.grip.0 / 0.8);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
|
||||
* Quaternion::rotation_y(-1.0);
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + 0.2) * Quaternion::rotation_y(-1.0);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(-1.4) * Quaternion::rotation_y(-2.8);
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(-1.4) * Quaternion::rotation_y(-2.8);
|
||||
|
||||
next.weapon_l.position =
|
||||
Vec3::new(move1 * 8.0, move1 * 1.0, move1 * 6.0);
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(move1 * 0.5)
|
||||
* Quaternion::rotation_y(move1 * -0.8);
|
||||
next.weapon_l.position = Vec3::new(move1 * 8.0, move1 * 1.0, move1 * 6.0);
|
||||
next.weapon_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.5) * Quaternion::rotation_y(move1 * -0.8);
|
||||
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-s_a.shoulder.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2 - foothorir * 1.0,
|
||||
);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_y(-0.4 + move1 * 0.8)
|
||||
* Quaternion::rotation_x(-0.4 + move1 * -0.2);
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_y(0.4 + move1 * -0.8)
|
||||
* Quaternion::rotation_x(0.4 + move1 * -0.8);
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-s_a.shoulder.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2 - foothorir * 1.0,
|
||||
);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_y(-0.4 + move1 * 0.8)
|
||||
* Quaternion::rotation_x(-0.4 + move1 * -0.2);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_y(0.4 + move1 * -0.8)
|
||||
* Quaternion::rotation_x(0.4 + move1 * -0.8);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-s_a.grip.1 + move1 * -5.0,
|
||||
0.0 + move1 * 6.0,
|
||||
s_a.grip.0 + move1 * 13.0,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(move1 * -3.0)
|
||||
* Quaternion::rotation_y(move1 * 1.5)
|
||||
* Quaternion::rotation_z(move1 * -1.5);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
next.hand_r.position = Vec3::new(
|
||||
-s_a.grip.1 + move1 * -5.0,
|
||||
0.0 + move1 * 6.0,
|
||||
s_a.grip.0 + move1 * 13.0,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(move1 * -3.0)
|
||||
* Quaternion::rotation_y(move1 * 1.5)
|
||||
* Quaternion::rotation_z(move1 * -1.5);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -12,12 +12,13 @@ pub struct BetaAnimation;
|
||||
|
||||
impl Animation for BetaAnimation {
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Option<ToolKind>,
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
f32,
|
||||
Option<&'a str>,
|
||||
);
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
@ -28,12 +29,13 @@ impl Animation for BetaAnimation {
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
_second_tool,
|
||||
velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
ability_id,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
@ -165,75 +167,28 @@ impl Animation for BetaAnimation {
|
||||
* Quaternion::rotation_y(-1.8 + move1 * 3.0 + move2 * -0.9)
|
||||
* Quaternion::rotation_z(move1 * -0.2 + move2 * -1.5);
|
||||
},
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Wendigo Magic" => {
|
||||
next.torso.position = Vec3::new(0.0, 0.0, move1 * -2.18);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4);
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.wendigomagic.singlestrike") => {
|
||||
next.torso.position = Vec3::new(0.0, 0.0, move1 * -2.18);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4);
|
||||
|
||||
next.control_l.position = Vec3::new(
|
||||
-9.0 + move2 * 6.0,
|
||||
19.0 + move1 * 6.0,
|
||||
-13.0 + move1 * 10.5,
|
||||
);
|
||||
next.control_r.position = Vec3::new(
|
||||
9.0 + move2 * -6.0,
|
||||
19.0 + move1 * 6.0,
|
||||
-13.0 + move1 * 14.5,
|
||||
);
|
||||
next.control_l.position =
|
||||
Vec3::new(-9.0 + move2 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5);
|
||||
next.control_r.position =
|
||||
Vec3::new(9.0 + move2 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(-0.15)
|
||||
* Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(0.15)
|
||||
* Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.3);
|
||||
},
|
||||
"Tidal Claws" => {
|
||||
next.torso.position = Vec3::new(0.0, 0.0, move1 * -1.4);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.5 + move2 * -0.4);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.5 + move2 * 0.4);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(
|
||||
move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm,
|
||||
);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(
|
||||
move1 * 0.4 + 0.4 * speednorm + (footrotl * -0.2) * speednorm,
|
||||
);
|
||||
|
||||
next.control_l.position = Vec3::new(
|
||||
-14.0 + move2 * 9.0,
|
||||
12.0 + move1 * 6.0,
|
||||
-12.0 + move1 * 9.0,
|
||||
);
|
||||
next.control_r.position = Vec3::new(
|
||||
14.0 + move2 * -9.0,
|
||||
12.0 + move1 * 6.0,
|
||||
-12.0 + move1 * 9.0,
|
||||
);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(-0.15)
|
||||
* Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(0.15)
|
||||
* Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.3);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(-0.15)
|
||||
* Quaternion::rotation_z(move1 * 0.5 + move2 * -0.6);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(0.15)
|
||||
* Quaternion::rotation_z(move1 * -0.5 + move2 * 0.6);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.3);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -12,12 +12,13 @@ pub struct ChargeMeleeAnimation;
|
||||
|
||||
impl Animation for ChargeMeleeAnimation {
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Option<ToolKind>,
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
f32,
|
||||
Option<&'a str>,
|
||||
);
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
@ -28,12 +29,13 @@ impl Animation for ChargeMeleeAnimation {
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
_second_tool,
|
||||
velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
ability_id,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
@ -97,118 +99,107 @@ impl Animation for ChargeMeleeAnimation {
|
||||
|
||||
#[allow(clippy::single_match)]
|
||||
match active_tool_kind {
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Minotaur" => {
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.3 + move2 * -0.9);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.3 + move2 * 0.9);
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.5 + move2 * 0.5);
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.minotaur.cleave") => {
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.3 + move2 * -0.9);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.3 + move2 * 0.9);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * -0.5 + move2 * 0.5);
|
||||
|
||||
next.control_l.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.control_r.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.weapon_l.position = Vec3::new(
|
||||
-12.0 + move2 * 5.0,
|
||||
-6.0 + move1 * 22.0 + move2 * 8.0,
|
||||
-18.0 + move1 * 16.0 + move2 * -19.0,
|
||||
);
|
||||
next.weapon_r.position = Vec3::new(
|
||||
12.0 + move2 * -5.0,
|
||||
-6.0 + move1 * 22.0 + move2 * 8.0,
|
||||
-18.0 + move1 * 14.0 + move2 * -19.0,
|
||||
);
|
||||
next.torso.position = Vec3::new(0.0, move2 * 7.06, 0.0);
|
||||
next.second.scale = Vec3::one() * 1.0;
|
||||
next.control_l.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.control_r.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.weapon_l.position = Vec3::new(
|
||||
-12.0 + move2 * 5.0,
|
||||
-6.0 + move1 * 22.0 + move2 * 8.0,
|
||||
-18.0 + move1 * 16.0 + move2 * -19.0,
|
||||
);
|
||||
next.weapon_r.position = Vec3::new(
|
||||
12.0 + move2 * -5.0,
|
||||
-6.0 + move1 * 22.0 + move2 * 8.0,
|
||||
-18.0 + move1 * 14.0 + move2 * -19.0,
|
||||
);
|
||||
next.torso.position = Vec3::new(0.0, move2 * 7.06, 0.0);
|
||||
next.second.scale = Vec3::one() * 1.0;
|
||||
|
||||
next.weapon_l.orientation =
|
||||
Quaternion::rotation_x(
|
||||
-1.67 + move1 * 2.8 + tension * 0.03 + move2 * -2.3,
|
||||
) * Quaternion::rotation_y(move1 * 0.3 + move2 * 0.5);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(
|
||||
-1.67 + move1 * 1.6 + tension * -0.03 + move2 * -0.7,
|
||||
) * Quaternion::rotation_y(
|
||||
move1 * -0.3 + move2 * -0.5,
|
||||
) * Quaternion::rotation_z(0.0);
|
||||
next.weapon_l.orientation =
|
||||
Quaternion::rotation_x(-1.67 + move1 * 2.8 + tension * 0.03 + move2 * -2.3)
|
||||
* Quaternion::rotation_y(move1 * 0.3 + move2 * 0.5);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(
|
||||
-1.67 + move1 * 1.6 + tension * -0.03 + move2 * -0.7,
|
||||
) * Quaternion::rotation_y(
|
||||
move1 * -0.3 + move2 * -0.5,
|
||||
) * Quaternion::rotation_z(0.0);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + move1 * 0.2 + move2 * 0.1);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + move1 * 0.4 + move2 * -0.4);
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + move1 * 0.2 + move2 * 0.1);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0 + move1 * 0.4 + move2 * -0.4);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1 * 1.0);
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(-0.3 + move1 * 1.0);
|
||||
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1 * 1.0);
|
||||
},
|
||||
"Husk Brute" => {
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(-0.3 + move1 * 1.0);
|
||||
},
|
||||
Some("common.abilities.custom.husk_brute.chargedmelee") => {
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.3 + move2 * -0.6);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.weapon_l.position =
|
||||
Vec3::new(-12.0 + (move1 * 10.0).min(6.0), -1.0, -15.0);
|
||||
next.weapon_r.position =
|
||||
Vec3::new(12.0 + (move1 * -10.0).max(-6.0), -1.0, -15.0);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.3 + move2 * -0.6);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.weapon_l.position =
|
||||
Vec3::new(-12.0 + (move1 * 10.0).min(6.0), -1.0, -15.0);
|
||||
next.weapon_r.position =
|
||||
Vec3::new(12.0 + (move1 * -10.0).max(-6.0), -1.0, -15.0);
|
||||
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1 * -0.8);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1 * 0.8);
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1 * -0.8);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1 * 0.8);
|
||||
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1 * 2.8 + move2 * -2.8);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1 * 2.8 + move2 * -2.8);
|
||||
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1 * 2.8 + move2 * -2.8);
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1 * 2.8 + move2 * -2.8);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(move1 * 2.5 + move2 * -2.0);
|
||||
next.control.orientation = Quaternion::rotation_x(move1 * 2.5 + move2 * -2.0);
|
||||
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * -0.6);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.2 + move2 * 0.6);
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2 + move2 * -0.6);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.2 + move2 * 0.6);
|
||||
|
||||
if speed < 0.1 {
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + move1 * -7.0 + move2 * 7.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 0.8)
|
||||
* Quaternion::rotation_z(move1 * 0.3 + move2 * -0.3);
|
||||
if speed < 0.1 {
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + move1 * -7.0 + move2 * 7.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 0.8)
|
||||
* Quaternion::rotation_z(move1 * 0.3 + move2 * -0.3);
|
||||
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + move1 * 5.0 + move2 * -5.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_y(move1 * -0.3 + move2 * 0.3)
|
||||
* Quaternion::rotation_z(move1 * 0.4 + move2 * -0.4);
|
||||
}
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(move1 * 0.4 + move2 * -0.6)
|
||||
* Quaternion::rotation_x(move2 * -0.4);
|
||||
},
|
||||
_ => {},
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + move1 * 5.0 + move2 * -5.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_y(move1 * -0.3 + move2 * 0.3)
|
||||
* Quaternion::rotation_z(move1 * 0.4 + move2 * -0.4);
|
||||
}
|
||||
}
|
||||
next.main.orientation = Quaternion::rotation_y(move1 * 0.4 + move2 * -0.6)
|
||||
* Quaternion::rotation_x(move2 * -0.4);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -12,12 +12,13 @@ pub struct DashAnimation;
|
||||
|
||||
impl Animation for DashAnimation {
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Option<ToolKind>,
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
f32,
|
||||
Option<&'a str>,
|
||||
);
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
@ -28,12 +29,13 @@ impl Animation for DashAnimation {
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
_second_tool,
|
||||
velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
ability_id,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
@ -152,77 +154,65 @@ impl Animation for DashAnimation {
|
||||
* Quaternion::rotation_y(-1.8 + move1 * -0.2 + move3 * -0.2)
|
||||
* Quaternion::rotation_z(move1 * -0.8 + move3 * -0.1);
|
||||
},
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Minotaur" => {
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.4 + move3 * 0.5)
|
||||
* Quaternion::rotation_z(move1 * -0.3 + move3 * -0.3);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.4 + move3 * 0.9)
|
||||
* Quaternion::rotation_z(move1 * 0.6 + move3 * -1.5);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_y(move1 * -0.2 + move3 * -0.1)
|
||||
* Quaternion::rotation_x(
|
||||
move1 * 0.4 + move3 * -0.7 + footrotr * 0.1,
|
||||
)
|
||||
* Quaternion::rotation_z(move1 * -0.6 + move3 * 1.6);
|
||||
next.control_l.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.control_r.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.weapon_l.position = Vec3::new(-12.0 + move1 * -3.0, -6.0, -18.0);
|
||||
next.weapon_r.position = Vec3::new(
|
||||
12.0 + move1 * -3.0,
|
||||
-6.0 + move1 * 2.0,
|
||||
-18.0 + move1 * 2.0,
|
||||
);
|
||||
next.second.scale = Vec3::one() * 1.0;
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.minotaur.charge") => {
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.4 + move3 * 0.5)
|
||||
* Quaternion::rotation_z(move1 * -0.3 + move3 * -0.3);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.4 + move3 * 0.9)
|
||||
* Quaternion::rotation_z(move1 * 0.6 + move3 * -1.5);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_y(move1 * -0.2 + move3 * -0.1)
|
||||
* Quaternion::rotation_x(move1 * 0.4 + move3 * -0.7 + footrotr * 0.1)
|
||||
* Quaternion::rotation_z(move1 * -0.6 + move3 * 1.6);
|
||||
next.control_l.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.control_r.position = Vec3::new(0.0, 4.0, 5.0);
|
||||
next.weapon_l.position = Vec3::new(-12.0 + move1 * -3.0, -6.0, -18.0);
|
||||
next.weapon_r.position =
|
||||
Vec3::new(12.0 + move1 * -3.0, -6.0 + move1 * 2.0, -18.0 + move1 * 2.0);
|
||||
next.second.scale = Vec3::one() * 1.0;
|
||||
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-1.67 + move1 * 0.4)
|
||||
* Quaternion::rotation_y(move1 * 0.4 + move2 * 0.2)
|
||||
* Quaternion::rotation_z(move3 * -0.5);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-1.67 + move1 * 0.3)
|
||||
* Quaternion::rotation_y(move1 * 0.6 + move2 * -0.6)
|
||||
* Quaternion::rotation_z(move3 * -0.5);
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-1.67 + move1 * 0.4)
|
||||
* Quaternion::rotation_y(move1 * 0.4 + move2 * 0.2)
|
||||
* Quaternion::rotation_z(move3 * -0.5);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-1.67 + move1 * 0.3)
|
||||
* Quaternion::rotation_y(move1 * 0.6 + move2 * -0.6)
|
||||
* Quaternion::rotation_z(move3 * -0.5);
|
||||
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(-0.3);
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(0.0) * Quaternion::rotation_y(0.0);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(-0.3);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(-0.3);
|
||||
},
|
||||
"Tidal Warrior" => {
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(0.0) * Quaternion::rotation_z(move1 * -0.3);
|
||||
next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.1)
|
||||
* Quaternion::rotation_z(move1 * PI / 2.0);
|
||||
next.lower_torso.orientation = Quaternion::rotation_x(move1 * 0.1)
|
||||
* Quaternion::rotation_x(move1 * -0.1)
|
||||
* Quaternion::rotation_z(move1 * -0.2);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(-0.3);
|
||||
},
|
||||
Some("common.abilities.custom.tidalwarrior.scuttle") => {
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(0.0) * Quaternion::rotation_z(move1 * -0.3);
|
||||
next.upper_torso.orientation = Quaternion::rotation_x(move1 * -0.1)
|
||||
* Quaternion::rotation_z(move1 * PI / 2.0);
|
||||
next.lower_torso.orientation = Quaternion::rotation_x(move1 * 0.1)
|
||||
* Quaternion::rotation_x(move1 * -0.1)
|
||||
* Quaternion::rotation_z(move1 * -0.2);
|
||||
|
||||
next.hand_l.position = Vec3::new(-14.0, 2.0 + motion * 1.5, -4.0);
|
||||
next.hand_l.position = Vec3::new(-14.0, 2.0 + motion * 1.5, -4.0);
|
||||
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 1.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(-0.35 + motion * -0.6);
|
||||
next.hand_r.position = Vec3::new(14.0, 2.0 + motion * -1.5, -4.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 1.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(-0.35 + motion * -0.6);
|
||||
next.hand_r.position = Vec3::new(14.0, 2.0 + motion * -1.5, -4.0);
|
||||
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 1.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.35 + motion * 0.6);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 1.0)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.35 + motion * 0.6);
|
||||
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.8);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 0.8);
|
||||
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.8);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 0.8);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Cultistwarlord, _) => (11.5, -1.0, 4.5),
|
||||
(Cultistwarlock, _) => (8.0, 0.0, 3.5),
|
||||
(Huskbrute, _) => (10.5, 0.0, -1.5),
|
||||
(Tursus, _) => (12.5, -2.5, 1.0),
|
||||
(Tursus, _) => (12.5, -2.5, -2.0),
|
||||
(Gigasfrost, _) => (10.5, 0.5, 0.0),
|
||||
},
|
||||
hand: match (body.species, body.body_type) {
|
||||
@ -386,7 +386,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Cultistwarlord, _) => (11.5, -1.0, -1.0),
|
||||
(Cultistwarlock, _) => (9.5, -1.0, 1.0),
|
||||
(Huskbrute, _) => (13.0, 0.5, -4.0),
|
||||
(Tursus, _) => (15.5, -2.5, -8.0),
|
||||
(Tursus, _) => (15.5, 0.0, -7.0),
|
||||
(Gigasfrost, _) => (17.0, 0.5, -6.0),
|
||||
},
|
||||
leg: match (body.species, body.body_type) {
|
||||
|
@ -11,11 +11,12 @@ use core::f32::consts::PI;
|
||||
pub struct ShockwaveAnimation;
|
||||
|
||||
type ShockwaveAnimationDependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Option<ToolKind>,
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
f32,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<&'a str>,
|
||||
);
|
||||
impl Animation for ShockwaveAnimation {
|
||||
type Dependency<'a> = ShockwaveAnimationDependency<'a>;
|
||||
@ -29,11 +30,12 @@ impl Animation for ShockwaveAnimation {
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
_second_tool_kind,
|
||||
_global_time,
|
||||
velocity,
|
||||
stage_section,
|
||||
ability_id,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
@ -125,150 +127,128 @@ impl Animation for ShockwaveAnimation {
|
||||
* Quaternion::rotation_z(move1 * 0.4 + move2 * -0.4);
|
||||
}
|
||||
},
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Yeti" => {
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.yeti.icespikes") => {
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1pow * 0.8 + move2 * -1.2);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.weapon_l.position =
|
||||
Vec3::new(-12.0 + (move1pow * 20.0).min(10.0), -1.0, -15.0);
|
||||
next.weapon_r.position =
|
||||
Vec3::new(12.0 + (move1pow * -20.0).max(-10.0), -1.0, -15.0);
|
||||
next.head.orientation = Quaternion::rotation_x(move1pow * 0.8 + move2 * -1.2);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.weapon_l.position =
|
||||
Vec3::new(-12.0 + (move1pow * 20.0).min(10.0), -1.0, -15.0);
|
||||
next.weapon_r.position =
|
||||
Vec3::new(12.0 + (move1pow * -20.0).max(-10.0), -1.0, -15.0);
|
||||
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1pow * -1.0);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1pow * 1.0);
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1pow * -1.0);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1pow * 1.0);
|
||||
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1pow * 2.8 + move2 * -2.8);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1pow * 2.8 + move2 * -2.8);
|
||||
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1pow * 2.8 + move2 * -2.8);
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1pow * 2.8 + move2 * -2.8);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(move1pow * 2.5 + move2 * -2.0);
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(move1pow * 2.5 + move2 * -2.0);
|
||||
|
||||
let twist = move1 * 0.6 + move3 * -0.6;
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1pow * 0.8 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(
|
||||
twist * -0.2 + move1 * -0.1 + move2 * 0.3,
|
||||
);
|
||||
let twist = move1 * 0.6 + move3 * -0.6;
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1pow * 0.8 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(twist * -0.2 + move1 * -0.1 + move2 * 0.3);
|
||||
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1pow * -0.8 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(twist);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1pow * -0.8 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(twist);
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + move1pow * -7.0 + move2 * 7.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1pow * -0.8 + move2 * 0.8)
|
||||
* Quaternion::rotation_z(move1pow * 0.3 + move2 * -0.3);
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + move1pow * -7.0 + move2 * 7.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(move1pow * -0.8 + move2 * 0.8)
|
||||
* Quaternion::rotation_z(move1pow * 0.3 + move2 * -0.3);
|
||||
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + move1pow * 5.0 + move2 * -5.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_y(move1pow * -0.3 + move2 * 0.3)
|
||||
* Quaternion::rotation_z(move1pow * 0.4 + move2 * -0.4);
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + move1pow * 5.0 + move2 * -5.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_r.orientation = Quaternion::rotation_y(move1pow * -0.3 + move2 * 0.3)
|
||||
* Quaternion::rotation_z(move1pow * 0.4 + move2 * -0.4);
|
||||
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(move1 * 0.4 + move2 * -0.6)
|
||||
* Quaternion::rotation_x(move2 * -0.4);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
next.main.orientation = Quaternion::rotation_y(move1 * 0.4 + move2 * -0.6)
|
||||
* Quaternion::rotation_x(move2 * -0.4);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
Some(ToolKind::Axe) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Frost Gigas" => {
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
Some(ToolKind::Axe) => match ability_id {
|
||||
Some("common.abilities.custom.gigas_frost.flashfreeze") => {
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1pow * 0.8 + move2 * -1.2);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.weapon_l.position =
|
||||
Vec3::new(-12.0 + (move1pow * 20.0).min(10.0), -1.0, -15.0);
|
||||
next.weapon_r.position =
|
||||
Vec3::new(12.0 + (move1pow * -20.0).max(-10.0), -1.0, -15.0);
|
||||
next.head.orientation = Quaternion::rotation_x(move1pow * 0.8 + move2 * -1.2);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.weapon_l.position =
|
||||
Vec3::new(-12.0 + (move1pow * 20.0).min(10.0), -1.0, -15.0);
|
||||
next.weapon_r.position =
|
||||
Vec3::new(12.0 + (move1pow * -20.0).max(-10.0), -1.0, -15.0);
|
||||
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1pow * -1.0);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1pow * 1.0);
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1pow * -1.0);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1)
|
||||
* Quaternion::rotation_z(move1pow * 1.0);
|
||||
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1pow * 2.8 + move2 * -2.8);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1pow * 2.8 + move2 * -2.8);
|
||||
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1pow * 2.8 + move2 * -2.8);
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_x(-0.3 + move1pow * 2.8 + move2 * -2.8);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(move1pow * 1.5 + move2 * 0.6);
|
||||
next.control.orientation = Quaternion::rotation_x(move1pow * 1.5 + move2 * 0.6);
|
||||
|
||||
let twist = move1 * 0.6 + move3 * -0.6;
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1pow * 0.4 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(
|
||||
twist * -0.2 + move1 * -0.1 + move2 * 0.3,
|
||||
);
|
||||
let twist = move1 * 0.6 + move3 * -0.6;
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1pow * 0.4 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(twist * -0.2 + move1 * -0.1 + move2 * 0.3);
|
||||
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1pow * -0.4 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(twist);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1pow * -0.4 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(twist);
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + move1pow * -7.0 + move2 * 7.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1pow * -0.8 + move2 * 0.8)
|
||||
* Quaternion::rotation_z(move1pow * 0.3 + move2 * -0.3);
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1 + move1pow * -7.0 + move2 * 7.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_l.orientation = Quaternion::rotation_x(move1pow * -0.8 + move2 * 0.8)
|
||||
* Quaternion::rotation_z(move1pow * 0.3 + move2 * -0.3);
|
||||
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + move1pow * 5.0 + move2 * -5.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_y(move1pow * -0.3 + move2 * 0.3)
|
||||
* Quaternion::rotation_z(move1pow * 0.4 + move2 * -0.4);
|
||||
next.main.position =
|
||||
Vec3::new(-5.0 + (move1pow * 20.0).min(10.0), 4.0, 12.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_y(move1 * 0.4 + move2 * -0.1)
|
||||
* Quaternion::rotation_x(PI);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
next.foot_r.position = Vec3::new(
|
||||
s_a.foot.0,
|
||||
s_a.foot.1 + move1pow * 5.0 + move2 * -5.0,
|
||||
s_a.foot.2,
|
||||
);
|
||||
next.foot_r.orientation = Quaternion::rotation_y(move1pow * -0.3 + move2 * 0.3)
|
||||
* Quaternion::rotation_z(move1pow * 0.4 + move2 * -0.4);
|
||||
next.main.position = Vec3::new(-5.0 + (move1pow * 20.0).min(10.0), 4.0, 12.0);
|
||||
next.main.orientation = Quaternion::rotation_y(move1 * 0.4 + move2 * -0.1)
|
||||
* Quaternion::rotation_x(PI);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ use core::f32::consts::PI;
|
||||
pub struct ShootAnimation;
|
||||
|
||||
type ShootAnimationDependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Option<ToolKind>,
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
Vec3<f32>,
|
||||
@ -19,6 +19,7 @@ type ShootAnimationDependency<'a> = (
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
f32,
|
||||
Option<&'a str>,
|
||||
);
|
||||
impl Animation for ShootAnimation {
|
||||
type Dependency<'a> = ShootAnimationDependency<'a>;
|
||||
@ -31,7 +32,7 @@ impl Animation for ShootAnimation {
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
_second_tool,
|
||||
velocity,
|
||||
_orientation,
|
||||
@ -39,6 +40,7 @@ impl Animation for ShootAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
ability_id,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
@ -234,166 +236,146 @@ impl Animation for ShootAnimation {
|
||||
next.lower_torso.orientation = Quaternion::rotation_y(move1 * -0.3);
|
||||
next.torso.position = Vec3::new(move1, 0.0, 0.0);
|
||||
},
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Wendigo Magic" => {
|
||||
let (move1base, _move2base, move3) = 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),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1base * pullback;
|
||||
next.control_l.position = Vec3::new(
|
||||
-9.0 + move1 * 6.0,
|
||||
19.0 + move1 * 6.0,
|
||||
-13.0 + move1 * 10.5,
|
||||
);
|
||||
next.control_r.position = Vec3::new(
|
||||
9.0 + move1 * -6.0,
|
||||
19.0 + move1 * 6.0,
|
||||
-13.0 + move1 * 14.5,
|
||||
);
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.wendigomagic.frostbomb") => {
|
||||
let (move1base, _move2base, move3) = 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),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1base * pullback;
|
||||
next.control_l.position =
|
||||
Vec3::new(-9.0 + move1 * 6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 10.5);
|
||||
next.control_r.position =
|
||||
Vec3::new(9.0 + move1 * -6.0, 19.0 + move1 * 6.0, -13.0 + move1 * 14.5);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(-0.15)
|
||||
* Quaternion::rotation_z(move1 * 0.5);
|
||||
next.control_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(0.15)
|
||||
* Quaternion::rotation_z(move1 * -0.5);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * -0.3);
|
||||
},
|
||||
"Yeti" => {
|
||||
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, 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(-0.15)
|
||||
* Quaternion::rotation_z(move1 * 0.5);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 0.5)
|
||||
* Quaternion::rotation_y(0.15)
|
||||
* Quaternion::rotation_z(move1 * -0.5);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * -0.3);
|
||||
},
|
||||
Some("common.abilities.custom.yeti.snowball") => {
|
||||
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, 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.4);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.weapon_l.position = Vec3::new(-12.0, -1.0, -15.0);
|
||||
next.weapon_r.position = Vec3::new(12.0, -1.0, -15.0);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.4);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.control_l.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_r.position = Vec3::new(-0.5, 4.0, 1.0);
|
||||
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0);
|
||||
next.weapon_l.position = Vec3::new(-12.0, -1.0, -15.0);
|
||||
next.weapon_r.position = Vec3::new(12.0, -1.0, -15.0);
|
||||
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
|
||||
next.weapon_l.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
|
||||
next.weapon_r.orientation = Quaternion::rotation_x(-PI / 2.0 - 0.1);
|
||||
|
||||
let twist = move1 * 0.8 + move3 * -0.8;
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(
|
||||
twist * -0.2 + move1 * -0.1 + move2 * 0.3,
|
||||
);
|
||||
let twist = move1 * 0.8 + move3 * -0.8;
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(twist * -0.2 + move1 * -0.1 + move2 * 0.3);
|
||||
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(twist);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(twist);
|
||||
|
||||
next.arm_control_r.orientation =
|
||||
Quaternion::rotation_x(move1 * PI / 2.0)
|
||||
* Quaternion::rotation_y(move1 * -PI / 2.0 + move2 * 2.5);
|
||||
//* Quaternion::rotation_y(move1 * -PI/2.0)
|
||||
//* Quaternion::rotation_z(move1 * -PI/2.0);
|
||||
next.arm_control_r.position =
|
||||
Vec3::new(0.0, move1 * 10.0 + move2 * -10.0, 0.0);
|
||||
},
|
||||
"Harvester" => {
|
||||
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, 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
|
||||
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
|
||||
next.arm_control_r.orientation = Quaternion::rotation_x(move1 * PI / 2.0)
|
||||
* Quaternion::rotation_y(move1 * -PI / 2.0 + move2 * 2.5);
|
||||
//* Quaternion::rotation_y(move1 * -PI/2.0)
|
||||
//* Quaternion::rotation_z(move1 * -PI/2.0);
|
||||
next.arm_control_r.position = Vec3::new(0.0, move1 * 10.0 + move2 * -10.0, 0.0);
|
||||
},
|
||||
Some("common.abilities.custom.harvester.explodingpumpkin") => {
|
||||
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, 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time.powi(4)),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
|
||||
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
|
||||
|
||||
next.control.position =
|
||||
Vec3::new(-7.0, 0.0 + s_a.grip.0 / 1.0, -s_a.grip.0 / 0.8);
|
||||
next.control.position =
|
||||
Vec3::new(-7.0, 0.0 + s_a.grip.0 / 1.0, -s_a.grip.0 / 0.8);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
|
||||
* Quaternion::rotation_y(-1.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
|
||||
* Quaternion::rotation_y(-1.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(-1.4) * Quaternion::rotation_y(-2.8);
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(-1.4) * Quaternion::rotation_y(-2.8);
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.2);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.2);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
|
||||
let twist = move1 * 0.8 + move3 * -0.8;
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.upper_torso.0,
|
||||
s_a.upper_torso.1 + move1 * 1.0 + move2 * -1.0,
|
||||
);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(
|
||||
twist * -0.2 + move1 * -0.1 + move2 * 0.3,
|
||||
);
|
||||
let twist = move1 * 0.8 + move3 * -0.8;
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.upper_torso.0,
|
||||
s_a.upper_torso.1 + move1 * 1.0 + move2 * -1.0,
|
||||
);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(twist * -0.2 + move1 * -0.1 + move2 * 0.3);
|
||||
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(-twist + move1 * 0.4);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(-twist + move1 * 0.4);
|
||||
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-s_a.shoulder.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2 - foothorir * 1.0,
|
||||
);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(-0.4);
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-s_a.shoulder.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2 - foothorir * 1.0,
|
||||
);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(-0.4);
|
||||
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
s_a.shoulder.0 + move2 * -2.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2,
|
||||
);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_y(move1 * -PI / 2.0)
|
||||
* Quaternion::rotation_x(move2 * 2.0)
|
||||
* Quaternion::rotation_z(move1 * -PI / 2.0);
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
s_a.shoulder.0 + move2 * -2.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2,
|
||||
);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_y(move1 * -PI / 2.0)
|
||||
* Quaternion::rotation_x(move2 * 2.0)
|
||||
* Quaternion::rotation_z(move1 * -PI / 2.0);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-s_a.grip.1 + move1 * -2.0 + move2 * 8.0,
|
||||
0.0 + move1 * 6.0,
|
||||
s_a.grip.0 + move1 * 18.0 + move2 * -19.0,
|
||||
);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(move1 * -3.0 + move2 * 3.0)
|
||||
* Quaternion::rotation_y(move1 * 0.5 + move2 * -1.5)
|
||||
* Quaternion::rotation_z(move1 * -1.5);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-s_a.grip.1 + move1 * -2.0 + move2 * 8.0,
|
||||
0.0 + move1 * 6.0,
|
||||
s_a.grip.0 + move1 * 18.0 + move2 * -19.0,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(move1 * -3.0 + move2 * 3.0)
|
||||
* Quaternion::rotation_y(move1 * 0.5 + move2 * -1.5)
|
||||
* Quaternion::rotation_z(move1 * -1.5);
|
||||
|
||||
if speed == 0.0 {
|
||||
next.leg_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -0.8);
|
||||
if speed == 0.0 {
|
||||
next.leg_l.orientation = Quaternion::rotation_x(move1 * 0.8 + move2 * -0.8);
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1,
|
||||
s_a.foot.2 + move1 * 4.0 + move2 * -4.0,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1,
|
||||
s_a.foot.2 + move1 * 4.0 + move2 * -4.0,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
|
||||
}
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -11,11 +11,12 @@ use std::f32::consts::PI;
|
||||
pub struct SpriteSummonAnimation;
|
||||
|
||||
type SpriteSummonAnimationDependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Option<ToolKind>,
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
f32,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
Option<&'a str>,
|
||||
);
|
||||
impl Animation for SpriteSummonAnimation {
|
||||
type Dependency<'a> = SpriteSummonAnimationDependency<'a>;
|
||||
@ -29,11 +30,12 @@ impl Animation for SpriteSummonAnimation {
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
_second_tool_kind,
|
||||
_global_time,
|
||||
velocity,
|
||||
stage_section,
|
||||
ability_id,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
@ -110,90 +112,80 @@ impl Animation for SpriteSummonAnimation {
|
||||
next.lower_torso.orientation = Quaternion::rotation_z(move1 * 0.5 + move2 * -0.5)
|
||||
* Quaternion::rotation_y(move2 * -0.1);
|
||||
},
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Harvester" => {
|
||||
let (move1, move1pow, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => {
|
||||
(anim_time, anim_time.powf(0.1), 0.0, 0.0)
|
||||
},
|
||||
Some(StageSection::Action) => {
|
||||
(1.0, 1.0, (anim_time.powf(4.0) * 80.0).min(1.0), 0.0)
|
||||
},
|
||||
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
|
||||
let speed = Vec2::<f32>::from(velocity).magnitude();
|
||||
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move1pow = move1pow * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.2);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
|
||||
let twist = move1 * 0.8 + move3 * -0.8;
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.upper_torso.0,
|
||||
s_a.upper_torso.1 + move1 * 1.0 + move2 * -1.0,
|
||||
);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(
|
||||
twist * -0.2 + move1 * -0.1 + move2 * 0.3,
|
||||
);
|
||||
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(-twist + move1 * 0.4);
|
||||
|
||||
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
|
||||
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
|
||||
|
||||
next.control.position = Vec3::new(
|
||||
-7.0 + move1pow * 7.0,
|
||||
0.0 + s_a.grip.0 / 1.0 + move1pow * 12.0,
|
||||
-s_a.grip.0 / 0.8 + move1pow * 20.0 + move2 * -3.0,
|
||||
);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
|
||||
* Quaternion::rotation_y(-1.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(-1.4 + move1pow * 2.2 + move2 * -0.6)
|
||||
* Quaternion::rotation_y(-PI);
|
||||
|
||||
next.shoulder_l.position =
|
||||
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(-0.4 + move1pow * 1.6);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_y(0.4)
|
||||
* Quaternion::rotation_x(0.4 + move1pow * 1.0);
|
||||
|
||||
if speed == 0.0 {
|
||||
next.leg_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -0.8);
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1,
|
||||
s_a.foot.2 + move1 * 4.0 + move2 * -4.0,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
|
||||
}
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.harvester.ensnaringvines") => {
|
||||
let (move1, move1pow, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time, anim_time.powf(0.1), 0.0, 0.0),
|
||||
Some(StageSection::Action) => {
|
||||
(1.0, 1.0, (anim_time.powf(4.0) * 80.0).min(1.0), 0.0)
|
||||
},
|
||||
_ => {},
|
||||
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
};
|
||||
|
||||
let speed = Vec2::<f32>::from(velocity).magnitude();
|
||||
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1 * pullback;
|
||||
let move1pow = move1pow * pullback;
|
||||
let move2 = move2 * pullback;
|
||||
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 0.2);
|
||||
next.jaw.position = Vec3::new(0.0, s_a.jaw.0, s_a.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(move2 * -0.3);
|
||||
|
||||
let twist = move1 * 0.8 + move3 * -0.8;
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
s_a.upper_torso.0,
|
||||
s_a.upper_torso.1 + move1 * 1.0 + move2 * -1.0,
|
||||
);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.8 + move2 * -1.1)
|
||||
* Quaternion::rotation_z(twist * -0.2 + move1 * -0.1 + move2 * 0.3);
|
||||
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.8 + move2 * 1.1)
|
||||
* Quaternion::rotation_z(-twist + move1 * 0.4);
|
||||
|
||||
next.control_l.position = Vec3::new(1.0, 2.0, 8.0);
|
||||
next.control_r.position = Vec3::new(1.0, 1.0, -2.0);
|
||||
|
||||
next.control.position = Vec3::new(
|
||||
-7.0 + move1pow * 7.0,
|
||||
0.0 + s_a.grip.0 / 1.0 + move1pow * 12.0,
|
||||
-s_a.grip.0 / 0.8 + move1pow * 20.0 + move2 * -3.0,
|
||||
);
|
||||
|
||||
next.control_l.orientation =
|
||||
Quaternion::rotation_x(PI / 2.0) * Quaternion::rotation_z(PI);
|
||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + 0.2)
|
||||
* Quaternion::rotation_y(-1.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
|
||||
next.control.orientation =
|
||||
Quaternion::rotation_x(-1.4 + move1pow * 2.2 + move2 * -0.6)
|
||||
* Quaternion::rotation_y(-PI);
|
||||
|
||||
next.shoulder_l.position =
|
||||
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(-0.4 + move1pow * 1.6);
|
||||
next.shoulder_r.orientation =
|
||||
Quaternion::rotation_y(0.4) * Quaternion::rotation_x(0.4 + move1pow * 1.0);
|
||||
|
||||
if speed == 0.0 {
|
||||
next.leg_l.orientation = Quaternion::rotation_x(move1 * 0.8 + move2 * -0.8);
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-s_a.foot.0,
|
||||
s_a.foot.1,
|
||||
s_a.foot.2 + move1 * 4.0 + move2 * -4.0,
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(move1 * -0.6 + move2 * 0.6);
|
||||
}
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ impl Animation for StunnedAnimation {
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(0.35);
|
||||
},
|
||||
"Beast Claws" => {
|
||||
"Beast Claws" | "Tursus Claws" => {
|
||||
next.shoulder_l.position =
|
||||
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
|
||||
|
@ -12,12 +12,13 @@ pub struct SummonAnimation;
|
||||
|
||||
impl Animation for SummonAnimation {
|
||||
type Dependency<'a> = (
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Option<ToolKind>,
|
||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||
Vec3<f32>,
|
||||
f32,
|
||||
Option<StageSection>,
|
||||
f32,
|
||||
Option<&'a str>,
|
||||
);
|
||||
type Skeleton = BipedLargeSkeleton;
|
||||
|
||||
@ -28,12 +29,13 @@ impl Animation for SummonAnimation {
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
_second_tool_kind,
|
||||
velocity,
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
ability_id,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
@ -119,109 +121,95 @@ impl Animation for SummonAnimation {
|
||||
next.control.orientation = Quaternion::rotation_x(-0.2 + move1 * 1.0)
|
||||
* Quaternion::rotation_y(-0.1 + move2 * -0.8);
|
||||
},
|
||||
Some(ToolKind::Natural) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Tidal Warrior" => {
|
||||
let (move1base, move2base, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => ((anim_time.powi(2)), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, (anim_time * 30.0).sin(), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1base * pullback;
|
||||
let move2 = move2base * pullback;
|
||||
next.torso.position = Vec3::new(0.0, 0.0 + move1 * 4.7, move1 * -18.8);
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
Some(ToolKind::Natural) => match ability_id {
|
||||
Some("common.abilities.custom.tidalwarrior.totem") => {
|
||||
let (move1base, move2base, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => ((anim_time.powi(2)), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, (anim_time * 30.0).sin(), 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time),
|
||||
_ => (0.0, 0.0, 0.0),
|
||||
};
|
||||
let pullback = 1.0 - move3;
|
||||
let move1 = move1base * pullback;
|
||||
let move2 = move2base * pullback;
|
||||
next.torso.position = Vec3::new(0.0, 0.0 + move1 * 4.7, move1 * -18.8);
|
||||
next.upper_torso.position =
|
||||
Vec3::new(0.0, s_a.upper_torso.0, s_a.upper_torso.1);
|
||||
|
||||
next.lower_torso.position =
|
||||
Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1);
|
||||
next.lower_torso.position =
|
||||
Vec3::new(0.0, s_a.lower_torso.0, s_a.lower_torso.1);
|
||||
|
||||
next.head.position =
|
||||
Vec3::new(0.0, s_a.head.0 + move1 * -8.0, s_a.head.1 + move1 * 6.0);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 2.5)
|
||||
* Quaternion::rotation_y(move1 * 0.4 + move2 * 0.05);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 2.5)
|
||||
* Quaternion::rotation_y(move1 * -0.4 + move2 * -0.05);
|
||||
next.head.orientation = Quaternion::rotation_x(move1 * 1.4)
|
||||
* Quaternion::rotation_y(move2 * 0.02);
|
||||
next.upper_torso.orientation = Quaternion::rotation_x(move1 * -1.5)
|
||||
* Quaternion::rotation_y(move2 * -0.02);
|
||||
next.lower_torso.orientation = Quaternion::rotation_x(move1 * 0.2)
|
||||
* Quaternion::rotation_y(move2 * 0.02);
|
||||
next.hand_l.position = Vec3::new(
|
||||
-14.0 + move1 * -5.0,
|
||||
2.0 + move1 * -2.0,
|
||||
-4.0 + move1 * 12.0,
|
||||
);
|
||||
next.hand_r.position = Vec3::new(
|
||||
14.0 + move1 * 5.0,
|
||||
2.0 + move1 * -2.0,
|
||||
-4.0 + move1 * 12.0,
|
||||
);
|
||||
next.head.position =
|
||||
Vec3::new(0.0, s_a.head.0 + move1 * -8.0, s_a.head.1 + move1 * 6.0);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(move1 * 2.5)
|
||||
* Quaternion::rotation_y(move1 * 0.4 + move2 * 0.05);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(move1 * 2.5)
|
||||
* Quaternion::rotation_y(move1 * -0.4 + move2 * -0.05);
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_x(move1 * 1.4) * Quaternion::rotation_y(move2 * 0.02);
|
||||
next.upper_torso.orientation = Quaternion::rotation_x(move1 * -1.5)
|
||||
* Quaternion::rotation_y(move2 * -0.02);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_x(move1 * 0.2) * Quaternion::rotation_y(move2 * 0.02);
|
||||
next.hand_l.position = Vec3::new(
|
||||
-14.0 + move1 * -5.0,
|
||||
2.0 + move1 * -2.0,
|
||||
-4.0 + move1 * 12.0,
|
||||
);
|
||||
next.hand_r.position =
|
||||
Vec3::new(14.0 + move1 * 5.0, 2.0 + move1 * -2.0, -4.0 + move1 * 12.0);
|
||||
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 1.5)
|
||||
* Quaternion::rotation_y(-move1 * 0.7 + move2 * 0.2)
|
||||
* Quaternion::rotation_z(-0.35);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 1.5)
|
||||
* Quaternion::rotation_y(move1 * 0.7 + move2 * 0.2)
|
||||
* Quaternion::rotation_z(0.35);
|
||||
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2);
|
||||
next.leg_l.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(move1 * -0.8);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 1.5)
|
||||
* Quaternion::rotation_y(-move1 * 0.7 + move2 * 0.2)
|
||||
* Quaternion::rotation_z(-0.35);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 1.5)
|
||||
* Quaternion::rotation_y(move1 * 0.7 + move2 * 0.2)
|
||||
* Quaternion::rotation_z(0.35);
|
||||
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2);
|
||||
next.leg_l.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(move1 * -0.8);
|
||||
|
||||
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2);
|
||||
next.foot_l.position =
|
||||
Vec3::new(-s_a.foot.0, s_a.foot.1 + move1 * -3.0, s_a.foot.2);
|
||||
next.foot_r.position =
|
||||
Vec3::new(s_a.foot.0, s_a.foot.1 + move1 * -3.0, s_a.foot.2);
|
||||
next.leg_r.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(move1 * -0.8);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(move1 * 0.8);
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(move1 * 0.8);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2);
|
||||
next.foot_l.position =
|
||||
Vec3::new(-s_a.foot.0, s_a.foot.1 + move1 * -3.0, s_a.foot.2);
|
||||
next.foot_r.position =
|
||||
Vec3::new(s_a.foot.0, s_a.foot.1 + move1 * -3.0, s_a.foot.2);
|
||||
next.leg_r.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(move1 * -0.8);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(move1 * 0.8);
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(move1 * 0.8);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
Some(ToolKind::Axe) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
match spec.as_str() {
|
||||
"Frost Gigas" => {
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-s_a.shoulder.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2 - foothorir * 1.0,
|
||||
);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 2.7 + 0.1 * speednorm)
|
||||
* Quaternion::rotation_y(move1 * 0.7 + 0.1 * speednorm);
|
||||
next.head.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_l.position = Vec3::new(
|
||||
-14.0 + move1 * -5.0,
|
||||
2.0 + move1 * -2.0,
|
||||
-2.0 + move1 * 6.0 + move2 * 4.0,
|
||||
);
|
||||
next.hand_r.position = Vec3::new(14.0, 2.0, -4.0);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0 + move1 * 2.2)
|
||||
* Quaternion::rotation_y(move1 * 0.1)
|
||||
* Quaternion::rotation_z(-0.35);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(0.35);
|
||||
next.main.position = Vec3::new(14.0, 2.0, -4.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(0.35);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
Some(ToolKind::Axe) => match ability_id {
|
||||
Some("common.abilities.custom.gigas_frost.frost_summons") => {
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-s_a.shoulder.0,
|
||||
s_a.shoulder.1,
|
||||
s_a.shoulder.2 - foothorir * 1.0,
|
||||
);
|
||||
next.shoulder_l.orientation =
|
||||
Quaternion::rotation_x(move1 * 2.7 + 0.1 * speednorm)
|
||||
* Quaternion::rotation_y(move1 * 0.7 + 0.1 * speednorm);
|
||||
next.head.orientation = Quaternion::rotation_x(0.0);
|
||||
next.hand_l.position = Vec3::new(
|
||||
-14.0 + move1 * -5.0,
|
||||
2.0 + move1 * -2.0,
|
||||
-2.0 + move1 * 6.0 + move2 * 4.0,
|
||||
);
|
||||
next.hand_r.position = Vec3::new(14.0, 2.0, -4.0);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(PI / 3.0 + move1 * 2.2)
|
||||
* Quaternion::rotation_y(move1 * 0.1)
|
||||
* Quaternion::rotation_z(-0.35);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(0.35);
|
||||
next.main.position = Vec3::new(14.0, 2.0, -4.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(0.35);
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ impl Animation for WieldAnimation {
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x(PI / 3.0) * Quaternion::rotation_z(0.35);
|
||||
},
|
||||
"Beast Claws" => {
|
||||
"Beast Claws" | "Tursus Claws" => {
|
||||
next.shoulder_l.position =
|
||||
Vec3::new(-s_a.shoulder.0, s_a.shoulder.1, s_a.shoulder.2);
|
||||
|
||||
|
@ -272,20 +272,20 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
feed: match (body.species, body.body_type) {
|
||||
(SnowyOwl, _) => -0.65,
|
||||
(HornedOwl, _) => -0.65,
|
||||
(Duck, _) => -0.65,
|
||||
(Cockatiel, _) => -0.65,
|
||||
(Chicken, _) => 1.2,
|
||||
(Bat, _) => -0.65,
|
||||
(Penguin, _) => -0.65,
|
||||
(Goose, _) => 1.4,
|
||||
(Peacock, _) => 1.6,
|
||||
(Eagle, _) => 1.2,
|
||||
(Parrot, _) => 1.2,
|
||||
(Crow, _) => 1.2,
|
||||
(Dodo, _) => 1.2,
|
||||
(Parakeet, _) => 1.2,
|
||||
(Puffin, _) => 1.2,
|
||||
(Toucan, _) => 1.2,
|
||||
(Duck, _) => -0.55,
|
||||
(Cockatiel, _) => -0.60,
|
||||
(Chicken, _) => -0.65,
|
||||
(Bat, _) => -0.55,
|
||||
(Penguin, _) => -0.75,
|
||||
(Goose, _) => -0.65,
|
||||
(Peacock, _) => -1.2,
|
||||
(Eagle, _) => -0.75,
|
||||
(Parrot, _) => -0.60,
|
||||
(Crow, _) => -0.65,
|
||||
(Dodo, _) => -0.65,
|
||||
(Parakeet, _) => -0.60,
|
||||
(Puffin, _) => -0.75,
|
||||
(Toucan, _) => -0.50,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ use super::{
|
||||
CharacterSkeleton, SkeletonAttr,
|
||||
};
|
||||
use common::{
|
||||
comp::item::{AbilitySpec, Hands, ToolKind},
|
||||
comp::item::{Hands, ToolKind},
|
||||
states::utils::AbilityInfo,
|
||||
};
|
||||
use std::{f32::consts::PI, ops::Mul};
|
||||
@ -12,8 +12,9 @@ pub struct MusicAnimation;
|
||||
|
||||
type MusicAnimationDependency<'a> = (
|
||||
(Option<Hands>, Option<Hands>),
|
||||
(Option<AbilityInfo>, Option<&'a AbilitySpec>, f32),
|
||||
(Option<AbilityInfo>, f32),
|
||||
Vec3<f32>,
|
||||
Option<&'a str>,
|
||||
);
|
||||
impl Animation for MusicAnimation {
|
||||
type Dependency<'a> = MusicAnimationDependency<'a>;
|
||||
@ -25,7 +26,7 @@ impl Animation for MusicAnimation {
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_music")]
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_hands, (ability_info, active_tool_spec, global_time), rel_vel): Self::Dependency<'_>,
|
||||
(_hands, (ability_info, global_time), rel_vel, ability_id): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -98,228 +99,236 @@ impl Animation for MusicAnimation {
|
||||
(global_time + anim_time / 6.0).floor().mul(1337.0).sin() * 0.15,
|
||||
);
|
||||
|
||||
// TODO: create Instrument SubToolKinds to distinguish instruments
|
||||
match ability_info.and_then(|a| a.tool) {
|
||||
Some(ToolKind::Instrument) => {
|
||||
if let Some(AbilitySpec::Custom(spec)) = active_tool_spec {
|
||||
// instrument specific head_bop
|
||||
let head_bop = match spec.as_str() {
|
||||
"Flute" | "GlassFlute" | "Melodica" => 0.2,
|
||||
"Guitar" | "DarkGuitar" | "Lute" | "Sitar" => 0.5,
|
||||
"Lyre" | "IcyTalharpa" | "Kalimba" => 0.3,
|
||||
_ => 1.0,
|
||||
};
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
next.head.orientation = Quaternion::rotation_z((short * head_bop) * -0.6)
|
||||
* Quaternion::rotation_x(
|
||||
0.2 + head_look.y.max(0.0) + (shorte * head_bop).abs() * -0.2,
|
||||
// instrument specific head_bop
|
||||
let head_bop = match ability_id {
|
||||
Some("common.abilities.music.flute")
|
||||
| Some("common.abilities.music.glass_flute")
|
||||
| Some("common.abilities.music.melodica") => 0.2,
|
||||
|
||||
Some("common.abilities.music.guitar")
|
||||
| Some("common.abilities.music.dark_guitar")
|
||||
| Some("common.abilities.music.lute")
|
||||
| Some("common.abilities.music.sitar") => 0.5,
|
||||
|
||||
Some("common.abilities.music.lyre")
|
||||
| Some("common.abilities.music.icy_talharpa")
|
||||
| Some("common.abilities.music.kalimba") => 0.3,
|
||||
_ => 1.0,
|
||||
};
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
next.head.orientation = Quaternion::rotation_z((short * head_bop) * -0.6)
|
||||
* Quaternion::rotation_x(
|
||||
0.2 + head_look.y.max(0.0) + (shorte * head_bop).abs() * -0.2,
|
||||
);
|
||||
// instrument specific hand and instrument animations
|
||||
match ability_id {
|
||||
Some("common.abilities.music.double_bass") => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
3.5 - s_a.hand.0,
|
||||
7.0 + s_a.hand.1 + shortealt * -3.0,
|
||||
8.0 + s_a.hand.2 + shortealt * -0.75,
|
||||
);
|
||||
// instrument specific hand and instrument animations
|
||||
match spec.as_str() {
|
||||
"DoubleBass" => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
3.5 - s_a.hand.0,
|
||||
7.0 + s_a.hand.1 + shortealt * -3.0,
|
||||
8.0 + s_a.hand.2 + shortealt * -0.75,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.5);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-2.0 + s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * 6.0,
|
||||
4.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.4);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-2.0 + s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * 6.0,
|
||||
4.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.4);
|
||||
|
||||
next.main.position = Vec3::new(-4.0, 6.0, 16.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.1)
|
||||
* Quaternion::rotation_y(3.0)
|
||||
* Quaternion::rotation_z(PI / -3.0);
|
||||
},
|
||||
"Flute" | "GlassFlute" => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
4.0 - s_a.hand.0,
|
||||
6.0 + s_a.hand.1 + shortealt * -0.5,
|
||||
4.0 + s_a.hand.2 + shortealt * -0.75,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.9);
|
||||
next.main.position = Vec3::new(-4.0, 6.0, 16.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.1)
|
||||
* Quaternion::rotation_y(3.0)
|
||||
* Quaternion::rotation_z(PI / -3.0);
|
||||
},
|
||||
Some("common.abilities.music.flute")
|
||||
| Some("common.abilities.music.glass_flute") => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
4.0 - s_a.hand.0,
|
||||
6.0 + s_a.hand.1 + shortealt * -0.5,
|
||||
4.0 + s_a.hand.2 + shortealt * -0.75,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.9);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-4.5 + s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-4.5 + s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
|
||||
next.main.position = Vec3::new(-2.5, 10.0, -11.0);
|
||||
next.main.orientation = Quaternion::rotation_x(3.5)
|
||||
* Quaternion::rotation_y(PI)
|
||||
* Quaternion::rotation_z(0.05);
|
||||
},
|
||||
"Guitar" | "DarkGuitar" => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
1.0 - s_a.hand.0,
|
||||
6.0 + s_a.hand.1 + shortealt * -1.0,
|
||||
2.0 + s_a.hand.2 + shortealt * -1.5,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.8 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(0.8);
|
||||
next.main.position = Vec3::new(-2.5, 10.0, -11.0);
|
||||
next.main.orientation = Quaternion::rotation_x(3.5)
|
||||
* Quaternion::rotation_y(PI)
|
||||
* Quaternion::rotation_z(0.05);
|
||||
},
|
||||
Some("common.abilities.music.guitar")
|
||||
| Some("common.abilities.music.dark_guitar") => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
1.0 - s_a.hand.0,
|
||||
6.0 + s_a.hand.1 + shortealt * -1.0,
|
||||
2.0 + s_a.hand.2 + shortealt * -1.5,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.8 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(0.8);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-2.0 + s_a.hand.0 - shortealt * 1.25,
|
||||
6.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
3.0 + s_a.hand.2 + shortealt * 0.25,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.0 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-2.0 + s_a.hand.0 - shortealt * 1.25,
|
||||
6.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
3.0 + s_a.hand.2 + shortealt * 0.25,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.0 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
|
||||
next.main.position = Vec3::new(-14.0, 6.0, 5.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.1)
|
||||
* Quaternion::rotation_y(2.0)
|
||||
* Quaternion::rotation_z(PI / -3.0);
|
||||
},
|
||||
"Lyre" | "IcyTalharpa" => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
3.0 - s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * -0.1,
|
||||
1.0 + s_a.hand.2 + shortealt * -0.2,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6);
|
||||
next.main.position = Vec3::new(-14.0, 6.0, 5.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.1)
|
||||
* Quaternion::rotation_y(2.0)
|
||||
* Quaternion::rotation_z(PI / -3.0);
|
||||
},
|
||||
Some("common.abilities.music.lyre")
|
||||
| Some("common.abilities.music.icy_talharpa") => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
3.0 - s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * -0.1,
|
||||
1.0 + s_a.hand.2 + shortealt * -0.2,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-4.0 + s_a.hand.0 + shortealt * 2.0,
|
||||
5.0 + s_a.hand.1 - shortealt * 3.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.9);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-4.0 + s_a.hand.0 + shortealt * 2.0,
|
||||
5.0 + s_a.hand.1 - shortealt * 3.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.9);
|
||||
|
||||
next.main.position = Vec3::new(8.0, 14.0, -6.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.2)
|
||||
* Quaternion::rotation_y(-0.75)
|
||||
* Quaternion::rotation_z(0.20);
|
||||
},
|
||||
next.main.position = Vec3::new(8.0, 14.0, -6.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.2)
|
||||
* Quaternion::rotation_y(-0.75)
|
||||
* Quaternion::rotation_z(0.20);
|
||||
},
|
||||
Some("common.abilities.music.kalimba") => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
3.0 - s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * -0.1,
|
||||
1.0 + s_a.hand.2 + shortealt * -0.2,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6);
|
||||
|
||||
"Kalimba" => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
3.0 - s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * -0.1,
|
||||
1.0 + s_a.hand.2 + shortealt * -0.2,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-2.0 + s_a.hand.0 + shortealt * 2.0,
|
||||
5.0 + s_a.hand.1 - shortealt * 3.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.9);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-2.0 + s_a.hand.0 + shortealt * 2.0,
|
||||
5.0 + s_a.hand.1 - shortealt * 3.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.9);
|
||||
next.main.position = Vec3::new(8.0, 12.0, -8.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.2)
|
||||
* Quaternion::rotation_y(-0.75)
|
||||
* Quaternion::rotation_z(PI - 0.2);
|
||||
},
|
||||
Some("common.abilities.music.lute") => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
2.0 - s_a.hand.0,
|
||||
5.0 + s_a.hand.1 + shortealt * -1.0,
|
||||
2.0 + s_a.hand.2 + shortealt * -1.5,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.8 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(0.8);
|
||||
|
||||
next.main.position = Vec3::new(8.0, 12.0, -8.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.2)
|
||||
* Quaternion::rotation_y(-0.75)
|
||||
* Quaternion::rotation_z(PI - 0.2);
|
||||
},
|
||||
"Lute" => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
2.0 - s_a.hand.0,
|
||||
5.0 + s_a.hand.1 + shortealt * -1.0,
|
||||
2.0 + s_a.hand.2 + shortealt * -1.5,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.8 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(0.8);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-1.0 + s_a.hand.0 - shortealt * 1.25,
|
||||
6.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.25,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.0 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-1.0 + s_a.hand.0 - shortealt * 1.25,
|
||||
6.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.25,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.0 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
next.main.position = Vec3::new(-14.0, 6.0, 4.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.1)
|
||||
* Quaternion::rotation_y(2.0)
|
||||
* Quaternion::rotation_z(PI / -3.0);
|
||||
},
|
||||
Some("common.abilities.music.melodica") => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
4.0 - s_a.hand.0,
|
||||
6.0 + s_a.hand.1 + shortealt * -0.5,
|
||||
4.0 + s_a.hand.2 + shortealt * -0.75,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.9);
|
||||
|
||||
next.main.position = Vec3::new(-14.0, 6.0, 4.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.1)
|
||||
* Quaternion::rotation_y(2.0)
|
||||
* Quaternion::rotation_z(PI / -3.0);
|
||||
},
|
||||
"Melodica" => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
4.0 - s_a.hand.0,
|
||||
6.0 + s_a.hand.1 + shortealt * -0.5,
|
||||
4.0 + s_a.hand.2 + shortealt * -0.75,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(2.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.9);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-3.5 + s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-3.5 + s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
next.main.position = Vec3::new(-1.0, 2.0, 16.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.3)
|
||||
* Quaternion::rotation_y(PI)
|
||||
* Quaternion::rotation_z(PI / -2.0);
|
||||
},
|
||||
Some("common.abilities.music.washboard") => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
3.0 - s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * -0.1,
|
||||
1.0 + s_a.hand.2 + shortealt * -0.2,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6);
|
||||
|
||||
next.main.position = Vec3::new(-1.0, 2.0, 16.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.3)
|
||||
* Quaternion::rotation_y(PI)
|
||||
* Quaternion::rotation_z(PI / -2.0);
|
||||
},
|
||||
"Washboard" => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
3.0 - s_a.hand.0,
|
||||
4.0 + s_a.hand.1 + shortealt * -0.1,
|
||||
1.0 + s_a.hand.2 + shortealt * -0.2,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.4 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-4.0 + s_a.hand.0 + shortealt * 2.0,
|
||||
5.0 + s_a.hand.1 - shortealt * 3.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.9);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-4.0 + s_a.hand.0 + shortealt * 2.0,
|
||||
5.0 + s_a.hand.1 - shortealt * 3.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.75,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.4 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.9);
|
||||
next.main.position = Vec3::new(8.0, 14.0, -6.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.2)
|
||||
* Quaternion::rotation_y(-0.75)
|
||||
* Quaternion::rotation_z(0.20);
|
||||
},
|
||||
Some("common.abilities.music.sitar") => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
2.0 - s_a.hand.0,
|
||||
6.0 + s_a.hand.1 + shortealt * -1.0,
|
||||
1.0 + s_a.hand.2 + shortealt * -1.5,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.8 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(0.8);
|
||||
|
||||
next.main.position = Vec3::new(8.0, 14.0, -6.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.2)
|
||||
* Quaternion::rotation_y(-0.75)
|
||||
* Quaternion::rotation_z(0.20);
|
||||
},
|
||||
"Sitar" => {
|
||||
next.hand_l.position = Vec3::new(
|
||||
2.0 - s_a.hand.0,
|
||||
6.0 + s_a.hand.1 + shortealt * -1.0,
|
||||
1.0 + s_a.hand.2 + shortealt * -1.5,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.8 + foot * 0.15)
|
||||
* Quaternion::rotation_y(-0.6)
|
||||
* Quaternion::rotation_z(0.8);
|
||||
next.hand_r.position = Vec3::new(
|
||||
-2.0 + s_a.hand.0 - shortealt * 1.25,
|
||||
6.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.25,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.0 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
-2.0 + s_a.hand.0 - shortealt * 1.25,
|
||||
6.0 + s_a.hand.1 + shortealt * 2.0,
|
||||
2.0 + s_a.hand.2 + shortealt * 0.25,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(1.0 + foot * -0.15)
|
||||
* Quaternion::rotation_y(0.6);
|
||||
|
||||
next.main.position = Vec3::new(-15.0, 6.0, 4.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.1)
|
||||
* Quaternion::rotation_y(2.0)
|
||||
* Quaternion::rotation_z(PI / -3.0);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
next.main.position = Vec3::new(-15.0, 6.0, 4.0);
|
||||
next.main.orientation = Quaternion::rotation_x(0.1)
|
||||
* Quaternion::rotation_y(2.0)
|
||||
* Quaternion::rotation_z(PI / -3.0);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
|
@ -2062,8 +2062,9 @@ impl FigureMgr {
|
||||
&target_base,
|
||||
(
|
||||
hands,
|
||||
(Some(s.static_data.ability_info), active_tool_spec, time),
|
||||
(Some(s.static_data.ability_info), time),
|
||||
rel_vel,
|
||||
ability_id,
|
||||
),
|
||||
state.state_time,
|
||||
&mut state_animation_rate,
|
||||
@ -5064,12 +5065,13 @@ impl FigureMgr {
|
||||
anim::biped_large::ChargeMeleeAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
rel_vel,
|
||||
time,
|
||||
Some(s.stage_section),
|
||||
state.acc_vel,
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
@ -5126,7 +5128,7 @@ impl FigureMgr {
|
||||
anim::biped_large::AlphaAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
rel_vel,
|
||||
time,
|
||||
@ -5157,7 +5159,7 @@ impl FigureMgr {
|
||||
anim::biped_large::ShootAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
rel_vel,
|
||||
// TODO: Update to use the quaternion.
|
||||
@ -5166,6 +5168,7 @@ impl FigureMgr {
|
||||
time,
|
||||
Some(s.stage_section),
|
||||
state.acc_vel,
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
@ -5251,7 +5254,7 @@ impl FigureMgr {
|
||||
anim::biped_large::ShootAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
rel_vel,
|
||||
// TODO: Update to use the quaternion.
|
||||
@ -5260,6 +5263,7 @@ impl FigureMgr {
|
||||
time,
|
||||
Some(s.stage_section),
|
||||
state.acc_vel,
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
@ -5286,12 +5290,13 @@ impl FigureMgr {
|
||||
anim::biped_large::DashAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
rel_vel,
|
||||
time,
|
||||
Some(s.stage_section),
|
||||
state.acc_vel,
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
@ -5322,7 +5327,7 @@ impl FigureMgr {
|
||||
1 => anim::biped_large::AlphaAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
rel_vel,
|
||||
time,
|
||||
@ -5338,12 +5343,13 @@ impl FigureMgr {
|
||||
2 => anim::biped_large::BetaAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
rel_vel,
|
||||
time,
|
||||
Some(s.stage_section),
|
||||
state.acc_vel,
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
@ -5352,12 +5358,13 @@ impl FigureMgr {
|
||||
_ => anim::biped_large::BetaAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
rel_vel,
|
||||
time,
|
||||
Some(s.stage_section),
|
||||
state.acc_vel,
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
@ -5415,12 +5422,13 @@ impl FigureMgr {
|
||||
anim::biped_large::SummonAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
rel_vel,
|
||||
time,
|
||||
Some(s.stage_section),
|
||||
state.acc_vel,
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
@ -5516,11 +5524,12 @@ impl FigureMgr {
|
||||
anim::biped_large::ShockwaveAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
time,
|
||||
rel_vel.magnitude(),
|
||||
Some(s.stage_section),
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
@ -5542,13 +5551,14 @@ impl FigureMgr {
|
||||
anim::biped_large::BeamAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
time,
|
||||
rel_vel,
|
||||
Some(s.stage_section),
|
||||
state.acc_vel,
|
||||
state.state_time,
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
@ -5572,11 +5582,12 @@ impl FigureMgr {
|
||||
anim::biped_large::SpriteSummonAnimation::update_skeleton(
|
||||
&target_base,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
active_tool_kind,
|
||||
(second_tool_kind, second_tool_spec),
|
||||
time,
|
||||
rel_vel.magnitude(),
|
||||
Some(s.stage_section),
|
||||
ability_id,
|
||||
),
|
||||
stage_progress,
|
||||
&mut state_animation_rate,
|
||||
|
@ -2539,7 +2539,7 @@ impl Structure for SeaChapel {
|
||||
min: Vec3::new(
|
||||
cr_center.x + (diameter / 3) - 1,
|
||||
cr_center.y - 2,
|
||||
base - (2 * (diameter / 3)) - (diameter / 4),
|
||||
base - (2 * (diameter / 3)) - (diameter / 4) + 2,
|
||||
),
|
||||
max: Vec3::new(
|
||||
cr_center.x + (diameter / 3) + 6,
|
||||
|
Loading…
Reference in New Issue
Block a user