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