mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add BeastClaw npc weapontype
This commit is contained in:
parent
f9383e4dd8
commit
7a62ddfd3f
13
assets/common/items/npc_weapons/npcweapon/beast_claws.ron
Normal file
13
assets/common/items/npc_weapons/npcweapon/beast_claws.ron
Normal file
@ -0,0 +1,13 @@
|
||||
ItemDef(
|
||||
name: "Beast Claws",
|
||||
description: "Was attached to a beast.",
|
||||
kind: Tool(
|
||||
(
|
||||
kind: NpcWeapon("BeastClaws"),
|
||||
stats: (
|
||||
equip_time_millis: 500,
|
||||
power: 1.00),
|
||||
)
|
||||
),
|
||||
quality: Low,
|
||||
)
|
@ -18,7 +18,7 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
@ -48,7 +48,7 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
@ -78,7 +78,7 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
@ -108,7 +108,7 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
@ -138,15 +138,15 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
main: (
|
||||
offset: (-3.0, -3.5, -8.0),
|
||||
central: ("weapon.hammer.2hhammer_wendigo"),
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
)
|
||||
),
|
||||
(Wendigo, Female): (
|
||||
@ -168,15 +168,15 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
main: (
|
||||
offset: (-5.0, -6.5, -4.0),
|
||||
central: ("weapon.hammer.2hhammer_wendigo"),
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
)
|
||||
),
|
||||
(Troll, Male): (
|
||||
@ -198,7 +198,7 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
@ -228,7 +228,7 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
@ -258,7 +258,7 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
@ -288,7 +288,7 @@
|
||||
),
|
||||
tail: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
central: ("armor.empty"),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
second: (
|
||||
offset: (0.0, 0.0, 0.0),
|
||||
|
@ -530,6 +530,18 @@ impl Tool {
|
||||
move_efficiency: 0.05,
|
||||
},
|
||||
]
|
||||
} else if kind == "BeastClaws" {
|
||||
vec![
|
||||
BasicMelee {
|
||||
energy_cost: 0,
|
||||
buildup_duration: Duration::from_millis(500),
|
||||
recover_duration: Duration::from_millis(250),
|
||||
knockback: 25.0,
|
||||
base_healthchange: -200,
|
||||
range: 5.0,
|
||||
max_angle: 120.0,
|
||||
},
|
||||
]
|
||||
} else {
|
||||
vec![BasicMelee {
|
||||
energy_cost: 0,
|
||||
|
@ -114,7 +114,12 @@ impl LoadoutBuilder {
|
||||
},
|
||||
(biped_large::Species::Wendigo, _) => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.hammer.wendigo_hammer",
|
||||
"common.items.npc_weapons.npcweapon.beast_claws",
|
||||
));
|
||||
},
|
||||
(biped_large::Species::Werewolf, _) => {
|
||||
main_tool = Some(Item::new_from_asset_expect(
|
||||
"common.items.npc_weapons.npcweapon.beast_claws",
|
||||
));
|
||||
},
|
||||
(biped_large::Species::Cyclops, _) => {
|
||||
|
@ -8,7 +8,7 @@ version = "0.7.0"
|
||||
name = "voxygen_anim"
|
||||
# Uncomment to use animation hot reloading
|
||||
# Note: this breaks `cargo test`
|
||||
# crate-type = ["lib", "cdylib"]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
||||
[features]
|
||||
be-dyn-lib = []
|
||||
|
@ -27,7 +27,7 @@ impl Animation for AlphaAnimation {
|
||||
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, second_tool_kind, velocity, _global_time, stage_section): Self::Dependency,
|
||||
(active_tool_kind, second_tool_kind, velocity, global_time, stage_section): Self::Dependency,
|
||||
anim_time: f64,
|
||||
rate: &mut f32,
|
||||
skeleton_attr: &SkeletonAttr,
|
||||
@ -73,6 +73,25 @@ impl Animation for AlphaAnimation {
|
||||
let movement = anim_time as f32 * 1.0;
|
||||
let test = (anim_time as f32 * 1.75).sin();
|
||||
|
||||
let slower = (((1.0)
|
||||
/ (0.05
|
||||
+ 0.95
|
||||
* ((anim_time as f32 * lab as f32 * 8.0 - 0.5 * PI).sin()).powf(2.0 as f32)))
|
||||
.sqrt())
|
||||
* ((anim_time as f32 * lab as f32 * 8.0 - 0.5 * PI).sin())
|
||||
+ 1.0;
|
||||
let twist = (anim_time as f32 * lab as f32 * 4.0).sin() + 0.5;
|
||||
|
||||
let random = ((((2.0
|
||||
* (((global_time as f32 - anim_time as f32) * 10.0)
|
||||
- (((global_time as f32 - anim_time as f32) * 10.0).round())))
|
||||
.abs())
|
||||
* 10.0)
|
||||
.round())
|
||||
/ 10.0;
|
||||
|
||||
let switch = if random > 0.5 { 1.0 } else { -1.0 };
|
||||
|
||||
if let Some(ToolKind::Sword(_)) = active_tool_kind {
|
||||
next.hand_l.position = Vec3::new(-0.75, -1.0, 2.5);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(1.47) * Quaternion::rotation_y(-0.2);
|
||||
@ -431,6 +450,89 @@ impl Animation for AlphaAnimation {
|
||||
next.torso.orientation = Quaternion::rotation_x(0.0);
|
||||
next.torso.scale = Vec3::one() / 8.0 * 1.01;
|
||||
},
|
||||
Some(ToolKind::NpcWeapon(_)) => {
|
||||
if switch > 0.0 {
|
||||
next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1) * 1.02;
|
||||
next.head.orientation = Quaternion::rotation_z((twist * -0.5).max(-1.0)) * Quaternion::rotation_x(-0.2);
|
||||
next.head.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.upper_torso.0,
|
||||
skeleton_attr.upper_torso.1,
|
||||
);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z((twist * 0.5).min(1.0)) * Quaternion::rotation_x(0.0);
|
||||
next.upper_torso.scale = Vec3::one();
|
||||
|
||||
next.lower_torso.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.lower_torso.0,
|
||||
skeleton_attr.lower_torso.1,
|
||||
);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z((twist * -0.5).max(-1.0)) * Quaternion::rotation_x(0.0);
|
||||
next.lower_torso.scale = Vec3::one();
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2,
|
||||
);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_z(-1.5) * Quaternion::rotation_x(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.arm_control_r.position = Vec3::new(0.0, 0.0,-4.0);
|
||||
next.arm_control_r.orientation =
|
||||
Quaternion::rotation_x(1.0)
|
||||
* Quaternion::rotation_y(slow * -1.35)
|
||||
* Quaternion::rotation_z(-0.0);
|
||||
next.arm_control_r.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.tail.orientation = Quaternion::rotation_z(twist * 0.5);
|
||||
} else {
|
||||
next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1) * 1.02;
|
||||
next.head.orientation = Quaternion::rotation_z((twist * 0.5).min(1.0)) * Quaternion::rotation_x(-0.2);
|
||||
next.head.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.upper_torso.0,
|
||||
skeleton_attr.upper_torso.1,
|
||||
);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z((twist * -0.5).max(-1.0)) * Quaternion::rotation_x(0.0);
|
||||
next.upper_torso.scale = Vec3::one();
|
||||
|
||||
next.lower_torso.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.lower_torso.0,
|
||||
skeleton_attr.lower_torso.1,
|
||||
);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z((twist * 0.5).min(1.0)) * Quaternion::rotation_x(0.0);
|
||||
next.lower_torso.scale = Vec3::one();
|
||||
|
||||
next.arm_control_l.position = Vec3::new(0.0, 0.0,-4.0);
|
||||
next.arm_control_l.orientation =
|
||||
Quaternion::rotation_x(1.0)
|
||||
* Quaternion::rotation_y(slow * 1.35)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.arm_control_l.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2,
|
||||
);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_z(1.5) * Quaternion::rotation_x(0.0);
|
||||
next.hand_l.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.tail.orientation = Quaternion::rotation_z(twist * -0.5);
|
||||
};
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
next.shoulder_l.scale = Vec3::one();
|
||||
|
@ -170,7 +170,7 @@ impl Animation for IdleAnimation {
|
||||
skeleton_attr.leg.2 + torso * 0.2,
|
||||
);
|
||||
next.leg_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.leg_l.scale = Vec3::one();
|
||||
next.leg_l.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.leg_r.position = Vec3::new(
|
||||
skeleton_attr.leg.0,
|
||||
@ -178,7 +178,7 @@ impl Animation for IdleAnimation {
|
||||
skeleton_attr.leg.2 + torso * 0.2,
|
||||
);
|
||||
next.leg_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.leg_r.scale = Vec3::one();
|
||||
next.leg_r.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
|
@ -180,7 +180,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Wendigo, _) => (-1.0, 29.0),
|
||||
(Troll, _) => (-1.0, 27.5),
|
||||
(Dullahan, _) => (0.0, 29.0),
|
||||
(Werewolf, _) => (3.0, 27.5),
|
||||
(Werewolf, _) => (3.0, 26.0),
|
||||
(Occultsaurok, _) => (3.0, 23.0),
|
||||
(Mightysaurok, _) => (3.0, 23.0),
|
||||
(Slysaurok, _) => (3.0, 23.0),
|
||||
@ -251,7 +251,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
||||
(Wendigo, _) => (5.0, 2.5, -17.0),
|
||||
(Troll, _) => (6.0, 1.5, -13.0),
|
||||
(Dullahan, _) => (4.0, 2.5, -14.0),
|
||||
(Werewolf, _) => (4.0, 2.5, -8.5),
|
||||
(Werewolf, _) => (5.5, 3.0, -6.5),
|
||||
(Occultsaurok, _) => (3.5, 2.0, -12.0),
|
||||
(Mightysaurok, _) => (3.5, 2.0, -12.0),
|
||||
(Slysaurok, _) => (3.5, 2.0, -12.0),
|
||||
|
@ -225,7 +225,7 @@ impl Animation for RunAnimation {
|
||||
skeleton_attr.hand.2 + (foot1a * -3.0).max(1.0) * amplitude2,
|
||||
);
|
||||
next.hand_l.orientation =
|
||||
Quaternion::rotation_x((amplitude2 * foot1b * 0.9 + canceler * 0.9))
|
||||
Quaternion::rotation_x(amplitude2 * foot1b * 0.9 + canceler * 0.9)
|
||||
* Quaternion::rotation_y(tilt * -1.0);
|
||||
next.hand_l.scale = Vec3::one() * 0.96;
|
||||
|
||||
@ -235,7 +235,7 @@ impl Animation for RunAnimation {
|
||||
skeleton_attr.hand.2 + (foot2a * -3.0).max(1.0) * amplitude2,
|
||||
);
|
||||
next.hand_r.orientation =
|
||||
Quaternion::rotation_x((amplitude2 * foot2b * 0.9 + canceler * 0.7))
|
||||
Quaternion::rotation_x(amplitude2 * foot2b * 0.9 + canceler * 0.7)
|
||||
* Quaternion::rotation_y(tilt * -1.0);
|
||||
next.hand_r.scale = Vec3::one() * 0.96;
|
||||
|
||||
|
@ -37,8 +37,9 @@ impl Animation for WieldAnimation {
|
||||
);
|
||||
|
||||
let lab = 0.55;
|
||||
let breathe = (anim_time as f32 + 1.5 * PI).sin();
|
||||
let breathe = 0.0;
|
||||
let test = (anim_time as f32 + 36.0 * PI).sin();
|
||||
let torso = (anim_time as f32 * lab as f32 + 1.5 * PI).sin();
|
||||
|
||||
let slower = (anim_time as f32 * 1.0 + PI).sin();
|
||||
let slow = (anim_time as f32 * 3.5 + PI).sin();
|
||||
@ -86,6 +87,8 @@ impl Animation for WieldAnimation {
|
||||
|
||||
let footvertl = (anim_time as f32 * 16.0 * lab as f32).sin();
|
||||
let footvertr = (anim_time as f32 * 16.0 * lab as f32 + PI).sin();
|
||||
let handhoril = (anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin();
|
||||
let handhorir = (anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin();
|
||||
|
||||
let footrotl = (((5.0)
|
||||
/ (2.5
|
||||
@ -485,6 +488,314 @@ impl Animation for WieldAnimation {
|
||||
* Quaternion::rotation_z(u_slowalt * 0.08);
|
||||
next.control.scale = Vec3::one();
|
||||
},
|
||||
Some(ToolKind::NpcWeapon(_)) => {
|
||||
/*next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(breathe);
|
||||
next.shoulder_l.scale = Vec3::one() + breathe;
|
||||
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(breathe);
|
||||
next.shoulder_r.scale = Vec3::one() + breathe;
|
||||
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2 + torso * 0.6,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.hand_l.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2 + torso * 0.6,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control.orientation = Quaternion::rotation_z(0.0);
|
||||
next.control.scale = Vec3::one();*/
|
||||
if velocity < 0.5 {
|
||||
next.head.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.head.0,
|
||||
skeleton_attr.head.1 + torso * 0.2,
|
||||
) * 1.02;
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_z(look.x * 0.6) * Quaternion::rotation_x(look.y * 0.6 + breathe);
|
||||
next.head.scale = Vec3::one() * 1.02 + breathe * 0.4;
|
||||
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.upper_torso.0,
|
||||
skeleton_attr.upper_torso.1 + torso * 0.5,
|
||||
);
|
||||
next.upper_torso.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-breathe);
|
||||
next.upper_torso.scale = Vec3::one() - breathe * 0.4;
|
||||
|
||||
next.lower_torso.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.lower_torso.0,
|
||||
skeleton_attr.lower_torso.1 + torso * 0.15,
|
||||
);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(breathe);
|
||||
next.lower_torso.scale = Vec3::one() * 1.02 + breathe * 0.4;
|
||||
|
||||
if skeleton_attr.beast {
|
||||
next.jaw.position = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
|
||||
} else {
|
||||
next.jaw.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.jaw.0 - slower * 0.12,
|
||||
skeleton_attr.jaw.1 + slow * 0.2,
|
||||
);
|
||||
}
|
||||
next.jaw.orientation = Quaternion::rotation_x(-0.1 + breathe * 2.0);
|
||||
next.jaw.scale = Vec3::one() * 0.98;
|
||||
|
||||
next.tail.position = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1);
|
||||
next.tail.orientation =
|
||||
Quaternion::rotation_z(0.0 + slow * 0.2 + tailmove.x) * Quaternion::rotation_x(0.0);
|
||||
next.tail.scale = Vec3::one();
|
||||
|
||||
next.control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control.orientation = Quaternion::rotation_z(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation =
|
||||
Quaternion::rotation_x(PI) * Quaternion::rotation_y(0.0) * Quaternion::rotation_z(0.0);
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.main.position = Vec3::new(-5.0, -7.0, 7.0);
|
||||
next.main.orientation =
|
||||
Quaternion::rotation_x(PI) * Quaternion::rotation_y(0.6) * Quaternion::rotation_z(1.57);
|
||||
next.main.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(breathe);
|
||||
next.shoulder_l.scale = Vec3::one() + breathe;
|
||||
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(breathe);
|
||||
next.shoulder_r.scale = Vec3::one() + breathe;
|
||||
|
||||
next.hand_l.position = Vec3::new(
|
||||
-skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2 + torso * 0.6,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.hand_l.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1,
|
||||
skeleton_attr.hand.2 + torso * 0.6,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.hand_r.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.arm_control_l.scale = Vec3::one() * 1.0;
|
||||
next.arm_control_r.scale = Vec3::one() * 1.0;
|
||||
|
||||
next.leg_control_l.scale = Vec3::one() * 1.0;
|
||||
|
||||
next.leg_l.position = Vec3::new(
|
||||
-skeleton_attr.leg.0,
|
||||
skeleton_attr.leg.1,
|
||||
skeleton_attr.leg.2 + torso * 0.2,
|
||||
);
|
||||
next.leg_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.leg_l.scale = Vec3::one();
|
||||
|
||||
next.leg_r.position = Vec3::new(
|
||||
skeleton_attr.leg.0,
|
||||
skeleton_attr.leg.1,
|
||||
skeleton_attr.leg.2 + torso * 0.2,
|
||||
);
|
||||
next.leg_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.leg_r.scale = Vec3::one();
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.foot_l.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1,
|
||||
skeleton_attr.foot.2,
|
||||
);
|
||||
next.foot_r.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.0) / 8.0;
|
||||
next.torso.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
|
||||
next.torso.scale = Vec3::one() / 8.0;
|
||||
|
||||
next.leg_control_l.scale = Vec3::one() * 1.0;
|
||||
next.leg_control_r.scale = Vec3::one() * 1.0;
|
||||
next.arm_control_l.scale = Vec3::one() * 1.0;
|
||||
next.arm_control_r.scale = Vec3::one() * 1.0;
|
||||
|
||||
next.hold.scale = Vec3::one() * 0.0;
|
||||
} else {
|
||||
next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1) * 1.02;
|
||||
next.head.orientation =
|
||||
Quaternion::rotation_z(short * -0.18) * Quaternion::rotation_x(-0.05);
|
||||
next.head.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.upper_torso.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.upper_torso.0,
|
||||
skeleton_attr.upper_torso.1 + shortalt * -1.5,
|
||||
);
|
||||
next.upper_torso.orientation = Quaternion::rotation_z(short * 0.18);
|
||||
next.upper_torso.scale = Vec3::one();
|
||||
|
||||
next.lower_torso.position = Vec3::new(
|
||||
0.0,
|
||||
skeleton_attr.lower_torso.0,
|
||||
skeleton_attr.lower_torso.1,
|
||||
);
|
||||
next.lower_torso.orientation =
|
||||
Quaternion::rotation_z(short * 0.15) * Quaternion::rotation_x(0.14);
|
||||
next.lower_torso.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.jaw.position = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
|
||||
next.jaw.orientation = Quaternion::rotation_x(0.0);
|
||||
next.jaw.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.tail.position = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1);
|
||||
next.tail.orientation = Quaternion::rotation_x(shortalt * 0.3);
|
||||
next.tail.scale = Vec3::one();
|
||||
|
||||
next.second.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.second.orientation = Quaternion::rotation_x(PI)
|
||||
* Quaternion::rotation_y(0.0)
|
||||
* Quaternion::rotation_z(0.0);
|
||||
next.second.scale = Vec3::one() * 0.0;
|
||||
|
||||
next.control.position = Vec3::new(0.0, 0.0, 0.0);
|
||||
next.control.orientation = Quaternion::rotation_z(0.0);
|
||||
next.control.scale = Vec3::one();
|
||||
|
||||
next.main.position = Vec3::new(-5.0, -7.0, 7.0);
|
||||
next.main.orientation = Quaternion::rotation_x(PI)
|
||||
* Quaternion::rotation_y(0.6)
|
||||
* Quaternion::rotation_z(1.57);
|
||||
next.main.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.shoulder_l.position = Vec3::new(
|
||||
-skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1 + foothoril * -3.0,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.shoulder_l.orientation = Quaternion::rotation_x(footrotl * -0.36)
|
||||
* Quaternion::rotation_y(0.1)
|
||||
* Quaternion::rotation_z(footrotl * 0.3);
|
||||
next.shoulder_l.scale = Vec3::one();
|
||||
|
||||
next.shoulder_r.position = Vec3::new(
|
||||
skeleton_attr.shoulder.0,
|
||||
skeleton_attr.shoulder.1 + foothorir * -3.0,
|
||||
skeleton_attr.shoulder.2,
|
||||
);
|
||||
next.shoulder_r.orientation = Quaternion::rotation_x(footrotr * -0.36)
|
||||
* Quaternion::rotation_y(-0.1)
|
||||
* Quaternion::rotation_z(footrotr * -0.3);
|
||||
next.shoulder_r.scale = Vec3::one();
|
||||
|
||||
next.hand_l.position = Vec3::new(
|
||||
-1.0 + -skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + foothoril * -4.0,
|
||||
skeleton_attr.hand.2 + foothoril * 1.0,
|
||||
);
|
||||
next.hand_l.orientation = Quaternion::rotation_x(0.15 + (handhoril * -1.2).max(-0.3))
|
||||
* Quaternion::rotation_y(handhoril * -0.1);
|
||||
next.hand_l.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.hand_r.position = Vec3::new(
|
||||
1.0 + skeleton_attr.hand.0,
|
||||
skeleton_attr.hand.1 + foothorir * -4.0,
|
||||
skeleton_attr.hand.2 + foothorir * 1.0,
|
||||
);
|
||||
next.hand_r.orientation = Quaternion::rotation_x(0.15 + (handhorir * -1.2).max(-0.3))
|
||||
* Quaternion::rotation_y(handhorir * 0.1);
|
||||
next.hand_r.scale = Vec3::one() * 1.02;
|
||||
|
||||
next.leg_l.position = Vec3::new(
|
||||
-skeleton_attr.leg.0,
|
||||
skeleton_attr.leg.1,
|
||||
skeleton_attr.leg.2,
|
||||
) * 0.98;
|
||||
next.leg_l.orientation =
|
||||
Quaternion::rotation_z(short * 0.18) * Quaternion::rotation_x(foothoril * 0.3);
|
||||
next.leg_l.scale = Vec3::one() * 0.98;
|
||||
|
||||
next.leg_r.position = Vec3::new(
|
||||
skeleton_attr.leg.0,
|
||||
skeleton_attr.leg.1,
|
||||
skeleton_attr.leg.2,
|
||||
) * 0.98;
|
||||
|
||||
next.leg_r.orientation =
|
||||
Quaternion::rotation_z(short * 0.18) * Quaternion::rotation_x(foothorir * 0.3);
|
||||
next.leg_r.scale = Vec3::one() * 0.98;
|
||||
|
||||
next.foot_l.position = Vec3::new(
|
||||
-skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothoril * 8.5,
|
||||
skeleton_attr.foot.2 + ((footvertl * 6.5).max(0.0)),
|
||||
);
|
||||
next.foot_l.orientation =
|
||||
Quaternion::rotation_x(-0.5 + footrotl * 0.85) * Quaternion::rotation_y(0.0);
|
||||
next.foot_l.scale = Vec3::one();
|
||||
|
||||
next.foot_r.position = Vec3::new(
|
||||
skeleton_attr.foot.0,
|
||||
skeleton_attr.foot.1 + foothorir * 8.5,
|
||||
skeleton_attr.foot.2 + ((footvertr * 6.5).max(0.0)),
|
||||
);
|
||||
next.foot_r.orientation =
|
||||
Quaternion::rotation_x(-0.5 + footrotr * 0.85) * Quaternion::rotation_y(0.0);
|
||||
next.foot_r.scale = Vec3::one();
|
||||
|
||||
next.torso.position = Vec3::new(0.0, 0.0, 0.0) / 8.0;
|
||||
next.torso.orientation = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.25);
|
||||
next.torso.scale = Vec3::one() / 8.0;
|
||||
|
||||
next.leg_control_l.scale = Vec3::one() * 1.0;
|
||||
next.leg_control_r.scale = Vec3::one() * 1.0;
|
||||
next.arm_control_l.scale = Vec3::one() * 1.0;
|
||||
next.arm_control_r.scale = Vec3::one() * 1.0;
|
||||
|
||||
next.hold.scale = Vec3::one() * 0.0;
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user