mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
anim tweaks, more loadout setup
This commit is contained in:
parent
130d51786a
commit
cb59c8017e
@ -2,7 +2,7 @@ ItemDef(
|
|||||||
name: "Adlet",
|
name: "Adlet",
|
||||||
description: "Ceremonial attire used by members.",
|
description: "Ceremonial attire used by members.",
|
||||||
kind: Armor((
|
kind: Armor((
|
||||||
kind: Chest("Adlet"),
|
kind: Chest("AdletBow"),
|
||||||
stats: (
|
stats: (
|
||||||
protection: Normal(2.0),
|
protection: Normal(2.0),
|
||||||
poise_resilience: Normal(1.0),
|
poise_resilience: Normal(1.0),
|
12
assets/common/items/npc_armor/chest/adlet/adlet_spear.ron
Normal file
12
assets/common/items/npc_armor/chest/adlet/adlet_spear.ron
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
ItemDef(
|
||||||
|
name: "Adlet",
|
||||||
|
description: "Ceremonial attire used by members.",
|
||||||
|
kind: Armor((
|
||||||
|
kind: Chest("AdletSpear"),
|
||||||
|
stats: (
|
||||||
|
protection: Normal(2.0),
|
||||||
|
poise_resilience: Normal(1.0),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
quality: Low,
|
||||||
|
)
|
@ -2,7 +2,7 @@ ItemDef(
|
|||||||
name: "Adlet",
|
name: "Adlet",
|
||||||
description: "Ceremonial attire used by members..",
|
description: "Ceremonial attire used by members..",
|
||||||
kind: Armor((
|
kind: Armor((
|
||||||
kind: Hand("Adlet"),
|
kind: Hand("AdletBow"),
|
||||||
stats: (
|
stats: (
|
||||||
protection: Normal(2.0),
|
protection: Normal(2.0),
|
||||||
poise_resilience: Normal(1.0),
|
poise_resilience: Normal(1.0),
|
12
assets/common/items/npc_armor/hand/adlet/adlet_spear.ron
Normal file
12
assets/common/items/npc_armor/hand/adlet/adlet_spear.ron
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
ItemDef(
|
||||||
|
name: "Adlet",
|
||||||
|
description: "Ceremonial attire used by members..",
|
||||||
|
kind: Armor((
|
||||||
|
kind: Hand("AdletSpear"),
|
||||||
|
stats: (
|
||||||
|
protection: Normal(2.0),
|
||||||
|
poise_resilience: Normal(1.0),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
quality: Low,
|
||||||
|
)
|
@ -1,12 +0,0 @@
|
|||||||
ItemDef(
|
|
||||||
name: "Haniwa",
|
|
||||||
description: "Ceremonial attire used by members..",
|
|
||||||
kind: Armor((
|
|
||||||
kind: Pants("Adlet"),
|
|
||||||
stats: (
|
|
||||||
protection: Normal(2.0),
|
|
||||||
poise_resilience: Normal(1.0),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
quality: Low,
|
|
||||||
)
|
|
12
assets/common/items/npc_armor/pants/adlet/adlet_bow.ron
Normal file
12
assets/common/items/npc_armor/pants/adlet/adlet_bow.ron
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
ItemDef(
|
||||||
|
name: "Adlet",
|
||||||
|
description: "Ceremonial attire used by members..",
|
||||||
|
kind: Armor((
|
||||||
|
kind: Pants("AdletBow"),
|
||||||
|
stats: (
|
||||||
|
protection: Normal(2.0),
|
||||||
|
poise_resilience: Normal(1.0),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
quality: Low,
|
||||||
|
)
|
12
assets/common/items/npc_armor/pants/adlet/adlet_spear.ron
Normal file
12
assets/common/items/npc_armor/pants/adlet/adlet_spear.ron
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
ItemDef(
|
||||||
|
name: "Adlet",
|
||||||
|
description: "Ceremonial attire used by members..",
|
||||||
|
kind: Armor((
|
||||||
|
kind: Pants("AdletSpear"),
|
||||||
|
stats: (
|
||||||
|
protection: Normal(2.0),
|
||||||
|
poise_resilience: Normal(1.0),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
quality: Low,
|
||||||
|
)
|
@ -9,8 +9,11 @@
|
|||||||
"Sahagin": (
|
"Sahagin": (
|
||||||
vox_spec: ("npc.sahagin.male.chest", (-4.5, -8.0, -8.0)),
|
vox_spec: ("npc.sahagin.male.chest", (-4.5, -8.0, -8.0)),
|
||||||
),
|
),
|
||||||
"Adlet": (
|
"AdletSpear": (
|
||||||
vox_spec: ("npc.adlet.male.chest", (-5.0, -3.5, -2.0)),
|
vox_spec: ("npc.adlet.male.spear.chest", (-5.0, -3.5, -2.0)),
|
||||||
|
),
|
||||||
|
"AdletBow": (
|
||||||
|
vox_spec: ("npc.adlet.male.bow.chest", (-5.0, -3.5, -2.0)),
|
||||||
),
|
),
|
||||||
"Gnarling": (
|
"Gnarling": (
|
||||||
vox_spec: ("npc.gnarling.male.chest", (-4.5, -3.5, -2.5)),
|
vox_spec: ("npc.gnarling.male.chest", (-4.5, -3.5, -2.5)),
|
||||||
|
@ -24,12 +24,20 @@
|
|||||||
vox_spec: ("npc.sahagin.male.hand_r", (0.0, -4.0, -13.0)),
|
vox_spec: ("npc.sahagin.male.hand_r", (0.0, -4.0, -13.0)),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
"Adlet": (
|
"AdletSpear": (
|
||||||
left: (
|
left: (
|
||||||
vox_spec: ("npc.adlet.male.hand_r", (-4.0, -2.0, -7.0)),
|
vox_spec: ("npc.adlet.male.spear.hand_r", (-4.0, -2.0, -7.0)),
|
||||||
),
|
),
|
||||||
right: (
|
right: (
|
||||||
vox_spec: ("npc.adlet.male.hand_r", (0.0, -2.0, -7.0)),
|
vox_spec: ("npc.adlet.male.spear.hand_r", (0.0, -2.0, -7.0)),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"AdletBow": (
|
||||||
|
left: (
|
||||||
|
vox_spec: ("npc.adlet.male.bow.hand_r", (-4.0, -2.0, -7.0)),
|
||||||
|
),
|
||||||
|
right: (
|
||||||
|
vox_spec: ("npc.adlet.male.bow.hand_r", (0.0, -2.0, -7.0)),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
"Gnarling": (
|
"Gnarling": (
|
||||||
|
@ -9,8 +9,11 @@
|
|||||||
"Sahagin": (
|
"Sahagin": (
|
||||||
vox_spec: ("npc.sahagin.male.pants", (-2.5, -3.5, -2.0)),
|
vox_spec: ("npc.sahagin.male.pants", (-2.5, -3.5, -2.0)),
|
||||||
),
|
),
|
||||||
"Adlet": (
|
"AdletSpear": (
|
||||||
vox_spec: ("npc.adlet.male.pants", (-5.0, -4.5, -3.0)),
|
vox_spec: ("npc.adlet.male.spear.pants", (-5.0, -4.5, -3.0)),
|
||||||
|
),
|
||||||
|
"AdletBow": (
|
||||||
|
vox_spec: ("npc.adlet.male.bow.pants", (-5.0, -4.5, -3.0)),
|
||||||
),
|
),
|
||||||
"Gnarling": (
|
"Gnarling": (
|
||||||
vox_spec: ("npc.gnarling.male.pants", (-3.5, -3.0, -2.5)),
|
vox_spec: ("npc.gnarling.male.pants", (-3.5, -3.0, -2.5)),
|
||||||
@ -31,7 +34,7 @@
|
|||||||
vox_spec: ("npc.haniwa.male.pants", (-4.5, -4.5, -1.5)),
|
vox_spec: ("npc.haniwa.male.pants", (-4.5, -4.5, -1.5)),
|
||||||
),
|
),
|
||||||
"Myrmidon": (
|
"Myrmidon": (
|
||||||
vox_spec: ("npc.myrmidon.male.pants", (-4.5, -4.5, -1.5)),
|
vox_spec: ("npc.myrmidon.male.pants", (-2.5, -4.5, -1.5)),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
|
BIN
assets/voxygen/voxel/npc/adlet/male/bow/bow_movelater.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/adlet/male/bow/bow_movelater.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/adlet/male/bow/chest.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/adlet/male/bow/chest.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/adlet/male/bow/hand_r.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/adlet/male/bow/hand_r.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/adlet/male/bow/head.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/adlet/male/bow/head.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/adlet/male/bow/pants.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/adlet/male/bow/pants.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/npc/adlet/male/spear/head.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/npc/adlet/male/spear/head.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -290,16 +290,31 @@ impl LoadoutBuilder {
|
|||||||
Some(ToolKind::Bow) => LoadoutBuilder::new()
|
Some(ToolKind::Bow) => LoadoutBuilder::new()
|
||||||
.active_item(active_item)
|
.active_item(active_item)
|
||||||
.hands(Some(Item::new_from_asset_expect(
|
.hands(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.hand.adlet",
|
"common.items.npc_armor.hand.adlet.adlet_bow",
|
||||||
)))
|
)))
|
||||||
.feet(Some(Item::new_from_asset_expect(
|
.feet(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.foot.adlet",
|
"common.items.npc_armor.foot.adlet.adlet",
|
||||||
)))
|
)))
|
||||||
.chest(Some(Item::new_from_asset_expect(
|
.chest(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.chest.adlet",
|
"common.items.npc_armor.chest.adlet.adlet_bow",
|
||||||
)))
|
)))
|
||||||
.pants(Some(Item::new_from_asset_expect(
|
.pants(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.pants.adlet",
|
"common.items.npc_armor.pants.adlet.adlet_bow",
|
||||||
|
)))
|
||||||
|
.build(),
|
||||||
|
Some(ToolKind::Spear) | Some(ToolKind::Staff) => LoadoutBuilder::new()
|
||||||
|
.active_item(active_item)
|
||||||
|
.hands(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.hand.adlet.adlet_spear",
|
||||||
|
)))
|
||||||
|
.feet(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.foot.adlet.adlet",
|
||||||
|
)))
|
||||||
|
.chest(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.chest.adlet.adlet_spear",
|
||||||
|
)))
|
||||||
|
.pants(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.pants.adlet.adlet_spear",
|
||||||
)))
|
)))
|
||||||
.build(),
|
.build(),
|
||||||
_ => LoadoutBuilder::new().active_item(active_item).build(),
|
_ => LoadoutBuilder::new().active_item(active_item).build(),
|
||||||
@ -308,16 +323,46 @@ impl LoadoutBuilder {
|
|||||||
Some(ToolKind::Bow) => LoadoutBuilder::new()
|
Some(ToolKind::Bow) => LoadoutBuilder::new()
|
||||||
.active_item(active_item)
|
.active_item(active_item)
|
||||||
.feet(Some(Item::new_from_asset_expect(
|
.feet(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.foot.gnarling",
|
"common.items.npc_armor.foot.gnarling.gnarling",
|
||||||
)))
|
)))
|
||||||
.hands(Some(Item::new_from_asset_expect(
|
.hands(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.hand.gnarling",
|
"common.items.npc_armor.hand.gnarling.gnarling",
|
||||||
)))
|
)))
|
||||||
.chest(Some(Item::new_from_asset_expect(
|
.chest(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.chest.gnarling",
|
"common.items.npc_armor.chest.gnarling.gnarling",
|
||||||
)))
|
)))
|
||||||
.pants(Some(Item::new_from_asset_expect(
|
.pants(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.pants.gnarling",
|
"common.items.npc_armor.pants.gnarling.gnarling",
|
||||||
|
)))
|
||||||
|
.build(),
|
||||||
|
Some(ToolKind::Staff) => LoadoutBuilder::new()
|
||||||
|
.active_item(active_item)
|
||||||
|
.feet(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.foot.gnarling.gnarling",
|
||||||
|
)))
|
||||||
|
.hands(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.hand.gnarling.gnarling",
|
||||||
|
)))
|
||||||
|
.chest(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.chest.gnarling.gnarling",
|
||||||
|
)))
|
||||||
|
.pants(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.pants.gnarling.gnarling",
|
||||||
|
)))
|
||||||
|
.build(),
|
||||||
|
Some(ToolKind::Spear) => LoadoutBuilder::new()
|
||||||
|
.active_item(active_item)
|
||||||
|
.feet(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.foot.gnarling.gnarling",
|
||||||
|
)))
|
||||||
|
.hands(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.hand.gnarling.gnarling",
|
||||||
|
)))
|
||||||
|
.chest(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.chest.gnarling.gnarling",
|
||||||
|
)))
|
||||||
|
.pants(Some(Item::new_from_asset_expect(
|
||||||
|
"common.items.npc_armor.pants.gnarling.gnarling",
|
||||||
)))
|
)))
|
||||||
.build(),
|
.build(),
|
||||||
_ => LoadoutBuilder::new().active_item(active_item).build(),
|
_ => LoadoutBuilder::new().active_item(active_item).build(),
|
||||||
@ -325,46 +370,46 @@ impl LoadoutBuilder {
|
|||||||
Sahagin => LoadoutBuilder::new()
|
Sahagin => LoadoutBuilder::new()
|
||||||
.active_item(active_item)
|
.active_item(active_item)
|
||||||
.hands(Some(Item::new_from_asset_expect(
|
.hands(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.hand.sahagin",
|
"common.items.npc_armor.hand.sahagin.sahagin",
|
||||||
)))
|
)))
|
||||||
.feet(Some(Item::new_from_asset_expect(
|
.feet(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.foot.sahagin",
|
"common.items.npc_armor.foot.sahagin.sahagin",
|
||||||
)))
|
)))
|
||||||
.chest(Some(Item::new_from_asset_expect(
|
.chest(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.chest.sahagin",
|
"common.items.npc_armor.chest.sahagin.sahagin",
|
||||||
)))
|
)))
|
||||||
.pants(Some(Item::new_from_asset_expect(
|
.pants(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.pants.sahagin",
|
"common.items.npc_armor.pants.sahagin.sahagin",
|
||||||
)))
|
)))
|
||||||
.build(),
|
.build(),
|
||||||
Haniwa => LoadoutBuilder::new()
|
Haniwa => LoadoutBuilder::new()
|
||||||
.active_item(active_item)
|
.active_item(active_item)
|
||||||
.hands(Some(Item::new_from_asset_expect(
|
.hands(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.hand.haniwa",
|
"common.items.npc_armor.hand.haniwa.haniwa",
|
||||||
)))
|
)))
|
||||||
.feet(Some(Item::new_from_asset_expect(
|
.feet(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.foot.haniwa",
|
"common.items.npc_armor.foot.haniwa.haniwa",
|
||||||
)))
|
)))
|
||||||
.chest(Some(Item::new_from_asset_expect(
|
.chest(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.chest.haniwa",
|
"common.items.npc_armor.chest.haniwa.haniwa",
|
||||||
)))
|
)))
|
||||||
.pants(Some(Item::new_from_asset_expect(
|
.pants(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.pants.haniwa",
|
"common.items.npc_armor.pants.haniwa.haniwa",
|
||||||
)))
|
)))
|
||||||
.build(),
|
.build(),
|
||||||
Myrmidon => LoadoutBuilder::new()
|
Myrmidon => LoadoutBuilder::new()
|
||||||
.active_item(active_item)
|
.active_item(active_item)
|
||||||
.hands(Some(Item::new_from_asset_expect(
|
.hands(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.hand.myrmidon",
|
"common.items.npc_armor.hand.myrmidon.myrmidon",
|
||||||
)))
|
)))
|
||||||
.feet(Some(Item::new_from_asset_expect(
|
.feet(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.foot.myrmidon",
|
"common.items.npc_armor.foot.myrmidon.myrmidon",
|
||||||
)))
|
)))
|
||||||
.hands(Some(Item::new_from_asset_expect(
|
.chest(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.chest.myrmidon",
|
"common.items.npc_armor.chest.myrmidon.myrmidon",
|
||||||
)))
|
)))
|
||||||
.feet(Some(Item::new_from_asset_expect(
|
.pants(Some(Item::new_from_asset_expect(
|
||||||
"common.items.npc_armor.pants.myrmidon",
|
"common.items.npc_armor.pants.myrmidon.myrmidon",
|
||||||
)))
|
)))
|
||||||
.build(),
|
.build(),
|
||||||
Guard => LoadoutBuilder::new()
|
Guard => LoadoutBuilder::new()
|
||||||
|
@ -59,13 +59,13 @@ impl Body {
|
|||||||
quadruped_medium::Species::Antelope => 185.0,
|
quadruped_medium::Species::Antelope => 185.0,
|
||||||
quadruped_medium::Species::Kelpie => 180.0,
|
quadruped_medium::Species::Kelpie => 180.0,
|
||||||
quadruped_medium::Species::Horse => 180.0,
|
quadruped_medium::Species::Horse => 180.0,
|
||||||
quadruped_medium::Species::Barghest => 180.0,
|
quadruped_medium::Species::Barghest => 80.0,
|
||||||
quadruped_medium::Species::Cattle => 180.0,
|
quadruped_medium::Species::Cattle => 80.0,
|
||||||
quadruped_medium::Species::Darkhound => 180.0,
|
quadruped_medium::Species::Darkhound => 160.0,
|
||||||
quadruped_medium::Species::Highland => 180.0,
|
quadruped_medium::Species::Highland => 80.0,
|
||||||
quadruped_medium::Species::Yak => 180.0,
|
quadruped_medium::Species::Yak => 90.0,
|
||||||
quadruped_medium::Species::Panda => 180.0,
|
quadruped_medium::Species::Panda => 90.0,
|
||||||
quadruped_medium::Species::Bear => 180.0,
|
quadruped_medium::Species::Bear => 90.0,
|
||||||
},
|
},
|
||||||
Body::BipedSmall(_) => 80.0,
|
Body::BipedSmall(_) => 80.0,
|
||||||
Body::BirdMedium(_) => 80.0,
|
Body::BirdMedium(_) => 80.0,
|
||||||
|
@ -25,10 +25,10 @@ impl Animation for IdleAnimation {
|
|||||||
let mut next = (*skeleton).clone();
|
let mut next = (*skeleton).clone();
|
||||||
|
|
||||||
let lab = 1.0;
|
let lab = 1.0;
|
||||||
let torso = (anim_time as f32 * lab as f32 + 1.5 * PI).sin();
|
let torso = (anim_time as f32 * lab as f32 + 1.5 * PI).sin() * 1.5;
|
||||||
|
|
||||||
let slower = (anim_time as f32 * 1.0 + PI).sin();
|
let slower = (anim_time as f32 * 2.0 + PI).sin() * 1.5;
|
||||||
let slow = (anim_time as f32 * 3.5 + PI).sin();
|
let slow = (anim_time as f32 * 7.0 + PI).sin() * 1.5;
|
||||||
|
|
||||||
let look = Vec2::new(
|
let look = Vec2::new(
|
||||||
((global_time + anim_time) as f32 / 8.0)
|
((global_time + anim_time) as f32 / 8.0)
|
||||||
@ -119,13 +119,13 @@ impl Animation for IdleAnimation {
|
|||||||
next.shoulder_r.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.shoulder_r.orientation = Quaternion::rotation_x(breathe);
|
next.shoulder_r.orientation = Quaternion::rotation_x(breathe);
|
||||||
|
|
||||||
next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6);
|
next.hand_l.position = Vec3::new(-s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * -0.1);
|
||||||
|
|
||||||
next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * 0.6);
|
next.hand_r.position = Vec3::new(s_a.hand.0, s_a.hand.1, s_a.hand.2 + torso * -0.1);
|
||||||
|
|
||||||
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2);
|
next.leg_l.position = Vec3::new(-s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * -0.2);
|
||||||
|
|
||||||
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * 0.2);
|
next.leg_r.position = Vec3::new(s_a.leg.0, s_a.leg.1, s_a.leg.2 + torso * -0.2);
|
||||||
|
|
||||||
next.foot_l.position = Vec3::new(-s_a.foot.0, s_a.foot.1, s_a.foot.2);
|
next.foot_l.position = Vec3::new(-s_a.foot.0, s_a.foot.1, s_a.foot.2);
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
|||||||
(Troll, _) => (1.0, -10.5),
|
(Troll, _) => (1.0, -10.5),
|
||||||
(Dullahan, _) => (0.0, -6.5),
|
(Dullahan, _) => (0.0, -6.5),
|
||||||
(Werewolf, _) => (1.0, -10.0),
|
(Werewolf, _) => (1.0, -10.0),
|
||||||
(Occultsaurok, _) => (0.0, -6.0),
|
(Occultsaurok, _) => (0.0, -5.0),
|
||||||
(Mightysaurok, _) => (0.0, -5.0),
|
(Mightysaurok, _) => (0.0, -5.0),
|
||||||
(Slysaurok, _) => (0.0, -6.0),
|
(Slysaurok, _) => (0.0, -6.0),
|
||||||
(Mindflayer, _) => (3.5, -19.5),
|
(Mindflayer, _) => (3.5, -19.5),
|
||||||
|
@ -64,14 +64,16 @@ impl Animation for AlphaAnimation {
|
|||||||
let movement2abs = movement2base * pullback;
|
let movement2abs = movement2base * pullback;
|
||||||
|
|
||||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||||
next.head.orientation = Quaternion::rotation_x(movement1abs * -0.1 + movement2abs * 0.5)
|
next.head.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * 0.3)
|
||||||
* Quaternion::rotation_z(movement1abs * -0.2 + movement2abs * 0.6)
|
* Quaternion::rotation_z(movement1abs * -0.2 + movement2abs * 0.6)
|
||||||
* Quaternion::rotation_y(movement1abs * 0.3 + movement2abs * -0.5);
|
* Quaternion::rotation_y(movement1abs * 0.3 + movement2abs * -0.5);
|
||||||
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1) / 13.0;
|
next.chest.position = Vec3::new(0.0, s_a.chest.0, s_a.chest.1) / 13.0;
|
||||||
next.chest.orientation = Quaternion::rotation_z(movement1abs * 0.5 + movement2abs * -0.6);
|
next.chest.orientation = Quaternion::rotation_x(movement1abs * -0.2 + movement2abs * 0.3)
|
||||||
|
* Quaternion::rotation_z(movement1abs * 0.5 + movement2abs * -0.6);
|
||||||
|
|
||||||
next.pants.position = Vec3::new(0.0, s_a.pants.0, s_a.pants.1);
|
next.pants.position = Vec3::new(0.0, s_a.pants.0, s_a.pants.1);
|
||||||
next.pants.orientation = Quaternion::rotation_z(movement1abs * -0.2 + movement2abs * 0.2);
|
next.pants.orientation = Quaternion::rotation_x(movement1abs * 0.2 + movement2abs * -0.3)
|
||||||
|
* Quaternion::rotation_z(movement1abs * -0.2 + movement2abs * 0.2);
|
||||||
|
|
||||||
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
next.main.position = Vec3::new(0.0, 0.0, 0.0);
|
||||||
next.main.orientation = Quaternion::rotation_x(0.0);
|
next.main.orientation = Quaternion::rotation_x(0.0);
|
||||||
@ -88,20 +90,20 @@ impl Animation for AlphaAnimation {
|
|||||||
next.control.position = Vec3::new(
|
next.control.position = Vec3::new(
|
||||||
-3.0 + movement1abs * -3.0 + movement2abs * 5.0,
|
-3.0 + movement1abs * -3.0 + movement2abs * 5.0,
|
||||||
s_a.grip.2 + movement1abs * -12.0 + movement2abs * 17.0,
|
s_a.grip.2 + movement1abs * -12.0 + movement2abs * 17.0,
|
||||||
-s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0 + movement2abs * 10.0,
|
-s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0 + movement2abs * 5.0,
|
||||||
);
|
);
|
||||||
|
|
||||||
next.control_l.orientation =
|
next.control_l.orientation =
|
||||||
Quaternion::rotation_x(PI / 1.5 + movement1abs * -1.0 + movement2abs * 3.0)
|
Quaternion::rotation_x(PI / 1.5 + movement1abs * -1.5 + movement2abs * 2.5)
|
||||||
* Quaternion::rotation_y(-0.3);
|
* Quaternion::rotation_y(-0.3);
|
||||||
next.control_r.orientation = Quaternion::rotation_x(
|
next.control_r.orientation = Quaternion::rotation_x(
|
||||||
PI / 1.5 + s_a.grip.0 * 0.2 + movement1abs * -1.0 + movement2abs * 3.0,
|
PI / 1.5 + s_a.grip.0 * 0.2 + movement1abs * -1.5 + movement2abs * 2.5,
|
||||||
) * Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2);
|
) * Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2);
|
||||||
|
|
||||||
next.control.orientation =
|
next.control.orientation =
|
||||||
Quaternion::rotation_x(-1.35 + movement1abs * -0.3 + movement2abs * 1.0)
|
Quaternion::rotation_x(-1.35 + movement1abs * -0.3 + movement2abs * 0.5)
|
||||||
* Quaternion::rotation_z(movement1abs * 1.0 + movement2abs * -1.8)
|
* Quaternion::rotation_z(movement1abs * 1.0 + movement2abs * -1.0)
|
||||||
* Quaternion::rotation_y(movement2abs * 0.5);
|
* Quaternion::rotation_y(movement2abs * 0.0);
|
||||||
|
|
||||||
next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1);
|
next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1);
|
||||||
next.tail.orientation = Quaternion::rotation_x(0.05 * fastalt * speednormcancel)
|
next.tail.orientation = Quaternion::rotation_x(0.05 * fastalt * speednormcancel)
|
||||||
|
@ -84,26 +84,26 @@ impl Animation for ShootAnimation {
|
|||||||
|
|
||||||
match active_tool_kind {
|
match active_tool_kind {
|
||||||
Some(ToolKind::Bow) => {
|
Some(ToolKind::Bow) => {
|
||||||
let (movement1base, movement2base, movement3) = match stage_section {
|
let (move1base, move2base, move3) = match stage_section {
|
||||||
Some(StageSection::Buildup) => (anim_time as f32, 0.0, 0.0),
|
Some(StageSection::Buildup) => (anim_time as f32, 0.0, 0.0),
|
||||||
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(0.25), 0.0),
|
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(0.25), 0.0),
|
||||||
Some(StageSection::Recover) => (1.0, 1.0, anim_time as f32),
|
Some(StageSection::Recover) => (1.0, 1.0, anim_time as f32),
|
||||||
_ => (0.0, 0.0, 0.0),
|
_ => (0.0, 0.0, 0.0),
|
||||||
};
|
};
|
||||||
let pullback = 1.0 - movement3;
|
let pullback = 1.0 - move3;
|
||||||
let movement1abs = movement1base * pullback;
|
let move1abs = move1base * pullback;
|
||||||
let movement2abs = movement2base * pullback;
|
let move2abs = move2base * pullback;
|
||||||
next.control_l.position = Vec3::new(
|
next.control_l.position = Vec3::new(
|
||||||
1.0 - s_a.grip.0 * 2.0 + movement2abs * -4.0,
|
1.0 - s_a.grip.0 * 2.0 + move2abs * -4.0,
|
||||||
movement2abs * -8.0,
|
move2abs * -8.0,
|
||||||
0.0,
|
0.0,
|
||||||
);
|
);
|
||||||
next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 6.0, -2.0);
|
next.control_r.position = Vec3::new(-1.0 + s_a.grip.0 * 2.0, 6.0, -2.0);
|
||||||
|
|
||||||
next.control.position = Vec3::new(
|
next.control.position = Vec3::new(
|
||||||
-1.0,
|
-1.0,
|
||||||
2.0 + movement1abs * 4.0 + s_a.grip.2,
|
2.0 + move1abs * 3.0 + s_a.grip.2,
|
||||||
3.0 + movement1abs * 8.0 - s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0,
|
3.0 + move1abs * 7.0 - s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0,
|
||||||
);
|
);
|
||||||
|
|
||||||
next.control_l.orientation =
|
next.control_l.orientation =
|
||||||
@ -111,9 +111,44 @@ impl Animation for ShootAnimation {
|
|||||||
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + s_a.grip.0 * 0.2)
|
next.control_r.orientation = Quaternion::rotation_x(PI / 2.0 + s_a.grip.0 * 0.2)
|
||||||
* Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2);
|
* Quaternion::rotation_y(0.5 + s_a.grip.0 * 0.2);
|
||||||
|
|
||||||
next.control.orientation = Quaternion::rotation_x(-0.3 + movement1abs * 0.7)
|
next.control.orientation = Quaternion::rotation_x(-0.3 + move1abs * 0.4)
|
||||||
* Quaternion::rotation_y(0.5 * speednorm);
|
* Quaternion::rotation_y(0.5 * speednorm);
|
||||||
},
|
},
|
||||||
|
Some(ToolKind::Staff) => {
|
||||||
|
let (move1base, move2base, move3) = match stage_section {
|
||||||
|
Some(StageSection::Buildup) => ((anim_time as f32).powf(0.25), 0.0, 0.0),
|
||||||
|
Some(StageSection::Swing) => (1.0, (anim_time as f32).powf(0.25), 0.0),
|
||||||
|
Some(StageSection::Recover) => (1.0, 1.0, anim_time as f32),
|
||||||
|
_ => (0.0, 0.0, 0.0),
|
||||||
|
};
|
||||||
|
let pullback = 1.0 - move3;
|
||||||
|
let move1abs = move1base * pullback;
|
||||||
|
let move2abs = move2base * pullback;
|
||||||
|
next.control_l.position = Vec3::new(2.0 - s_a.grip.0 * 2.0, 1.0, 3.0);
|
||||||
|
next.control_r.position = Vec3::new(
|
||||||
|
7.0 + s_a.grip.0 * 2.0 + move1abs * -8.0,
|
||||||
|
-4.0 + move1abs * 4.0,
|
||||||
|
3.0,
|
||||||
|
);
|
||||||
|
|
||||||
|
next.control.position = Vec3::new(
|
||||||
|
-5.0,
|
||||||
|
-1.0 + s_a.grip.2,
|
||||||
|
-2.0 + -s_a.grip.2 / 2.5 + s_a.grip.0 * -2.0 + move1abs * 5.0,
|
||||||
|
);
|
||||||
|
|
||||||
|
next.control_l.orientation = Quaternion::rotation_x(PI / 2.0 + move1abs * 0.8)
|
||||||
|
* Quaternion::rotation_y(-0.3)
|
||||||
|
* Quaternion::rotation_z(-0.3);
|
||||||
|
next.control_r.orientation =
|
||||||
|
Quaternion::rotation_x(PI / 2.0 + s_a.grip.0 * 0.2 + move1abs * 0.8)
|
||||||
|
* Quaternion::rotation_y(-0.4 + s_a.grip.0 * 0.2 + move1abs * 0.8)
|
||||||
|
* Quaternion::rotation_z(-0.0);
|
||||||
|
|
||||||
|
next.control.orientation = Quaternion::rotation_x(-0.3 + move1abs * -0.6)
|
||||||
|
* Quaternion::rotation_y(-0.2 * speednorm)
|
||||||
|
* Quaternion::rotation_z(0.5 + move1abs * 0.6);
|
||||||
|
},
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
|||||||
tempo: match (body.species, body.body_type) {
|
tempo: match (body.species, body.body_type) {
|
||||||
(Crocodile, _) => (0.7),
|
(Crocodile, _) => (0.7),
|
||||||
(Alligator, _) => (0.7),
|
(Alligator, _) => (0.7),
|
||||||
(Salamander, _) => (0.75),
|
(Salamander, _) => (0.85),
|
||||||
(Monitor, _) => (1.4),
|
(Monitor, _) => (1.4),
|
||||||
(Tortoise, _) => (0.7),
|
(Tortoise, _) => (0.7),
|
||||||
(Rocksnapper, _) => (0.7),
|
(Rocksnapper, _) => (0.7),
|
||||||
|
@ -26,7 +26,7 @@ impl Animation for RunAnimation {
|
|||||||
|
|
||||||
let speednorm = (speed / 15.0).powf(0.25);
|
let speednorm = (speed / 15.0).powf(0.25);
|
||||||
|
|
||||||
let lab = 0.7 * s_a.tempo;
|
let lab = 0.8 * s_a.tempo;
|
||||||
let x_tilt = avg_vel.z.atan2(avg_vel.xy().magnitude()).max(-0.7) * speednorm;
|
let x_tilt = avg_vel.z.atan2(avg_vel.xy().magnitude()).max(-0.7) * speednorm;
|
||||||
|
|
||||||
let short = (((1.0) / (0.72 + 0.28 * ((acc_vel * lab as f32 + PI * 0.25).sin()).powi(2)))
|
let short = (((1.0) / (0.72 + 0.28 * ((acc_vel * lab as f32 + PI * 0.25).sin()).powi(2)))
|
||||||
|
@ -493,7 +493,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
|||||||
(Grolgar, _) => (-0.3),
|
(Grolgar, _) => (-0.3),
|
||||||
(Saber, _) => (-0.2),
|
(Saber, _) => (-0.2),
|
||||||
(Tuskram, _) => (0.3),
|
(Tuskram, _) => (0.3),
|
||||||
(Lion, _) => (0.2),
|
(Lion, _) => (-0.1),
|
||||||
(Tarasque, _) => (-0.5),
|
(Tarasque, _) => (-0.5),
|
||||||
(Catoblepas, _) => (-0.5),
|
(Catoblepas, _) => (-0.5),
|
||||||
(Bonerattler, _) => (-0.7),
|
(Bonerattler, _) => (-0.7),
|
||||||
|
@ -26,11 +26,13 @@ impl Animation for RunAnimation {
|
|||||||
*rate = 1.0;
|
*rate = 1.0;
|
||||||
//let increasefreqtest = (((1.0/speed)*3.0).round()).min(5.0);
|
//let increasefreqtest = (((1.0/speed)*3.0).round()).min(5.0);
|
||||||
let lab = 0.72; //0.72
|
let lab = 0.72; //0.72
|
||||||
let amplitude = (speed / 24.0).max(0.125);
|
let amplitude = (speed / 24.0).powf(0.4);
|
||||||
let amplitude2 = (speed * 1.4 / 24.0).sqrt().max(0.3);
|
let amplitude2 = (speed / 24.0).powf(0.4);
|
||||||
let amplitude3 = (speed / 24.0).sqrt().max(0.175);
|
let amplitude3 = (speed / 24.0).powf(0.4);
|
||||||
let speedmult = s_a.tempo;
|
let speedmult = s_a.tempo;
|
||||||
let canceler = (speed / 24.0).sqrt();
|
let canceler = (speed / 24.0).powf(0.4);
|
||||||
|
//println!("{} test", canceler);
|
||||||
|
|
||||||
let short = (((1.0)
|
let short = (((1.0)
|
||||||
/ (0.72
|
/ (0.72
|
||||||
+ 0.28
|
+ 0.28
|
||||||
@ -106,24 +108,24 @@ impl Animation for RunAnimation {
|
|||||||
next.ears.scale = Vec3::one() * 1.02;
|
next.ears.scale = Vec3::one() * 1.02;
|
||||||
|
|
||||||
//Gallop
|
//Gallop
|
||||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1 + shortalt * -0.5);
|
||||||
next.head.orientation = Quaternion::rotation_x(
|
next.head.orientation = Quaternion::rotation_x(
|
||||||
look.y * 0.3 / ((canceler).max(0.5)) + amplitude * short * -0.03 - 0.1,
|
look.y * 0.3 / ((canceler).max(0.5)) + amplitude * short * 0.05 - 0.1,
|
||||||
) * Quaternion::rotation_z(
|
) * Quaternion::rotation_z(
|
||||||
look.x * 0.3 / ((canceler).max(0.5)) + tilt * -1.2,
|
look.x * 0.3 / ((canceler).max(0.5)) + tilt * -1.2,
|
||||||
) * Quaternion::rotation_y(tilt * 0.8);
|
) * Quaternion::rotation_y(tilt * 0.8);
|
||||||
|
|
||||||
next.neck.position = Vec3::new(0.0, s_a.neck.0, s_a.neck.1);
|
next.neck.position = Vec3::new(0.0, s_a.neck.0, s_a.neck.1 + shortalt * -0.8);
|
||||||
next.neck.orientation = Quaternion::rotation_z(tilt * -0.8)
|
next.neck.orientation = Quaternion::rotation_z(tilt * -0.8)
|
||||||
* Quaternion::rotation_x(amplitude * short * -0.05)
|
* Quaternion::rotation_x(amplitude * short * 0.05)
|
||||||
* Quaternion::rotation_y(tilt * 0.3);
|
* Quaternion::rotation_y(tilt * 0.3);
|
||||||
|
|
||||||
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(0.0);
|
next.jaw.orientation = Quaternion::rotation_x(0.0);
|
||||||
|
|
||||||
next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1);
|
next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1);
|
||||||
next.tail.orientation =
|
next.tail.orientation = Quaternion::rotation_x(amplitude * shortalt * -0.3)
|
||||||
Quaternion::rotation_x(amplitude * shortalt * 0.3) * Quaternion::rotation_z(tilt * 1.5);
|
* Quaternion::rotation_z(tilt * 1.5);
|
||||||
|
|
||||||
next.torso_front.position = Vec3::new(
|
next.torso_front.position = Vec3::new(
|
||||||
0.0,
|
0.0,
|
||||||
@ -145,7 +147,7 @@ impl Animation for RunAnimation {
|
|||||||
s_a.torso_back.0,
|
s_a.torso_back.0,
|
||||||
s_a.torso_back.1 + amplitude * shortalt * 0.2 - 0.2,
|
s_a.torso_back.1 + amplitude * shortalt * 0.2 - 0.2,
|
||||||
);
|
);
|
||||||
next.torso_back.orientation = Quaternion::rotation_x(amplitude * short * -0.1)
|
next.torso_back.orientation = Quaternion::rotation_x(amplitude * short * -0.07)
|
||||||
* Quaternion::rotation_z(tilt * 1.8)
|
* Quaternion::rotation_z(tilt * 1.8)
|
||||||
* Quaternion::rotation_y(tilt * 0.6);
|
* Quaternion::rotation_y(tilt * 0.6);
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@ pub struct SkeletonAttr {
|
|||||||
minimize: f32,
|
minimize: f32,
|
||||||
spring: f32,
|
spring: f32,
|
||||||
feed: f32,
|
feed: f32,
|
||||||
|
lateral: f32,
|
||||||
}
|
}
|
||||||
impl<'a> std::convert::TryFrom<&'a comp::Body> for SkeletonAttr {
|
impl<'a> std::convert::TryFrom<&'a comp::Body> for SkeletonAttr {
|
||||||
type Error = ();
|
type Error = ();
|
||||||
@ -94,6 +95,7 @@ impl Default for SkeletonAttr {
|
|||||||
minimize: 0.0,
|
minimize: 0.0,
|
||||||
spring: 0.0,
|
spring: 0.0,
|
||||||
feed: 0.0,
|
feed: 0.0,
|
||||||
|
lateral: 0.0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -239,7 +241,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
|||||||
(Axolotl, _) => (-4.0, -1.0),
|
(Axolotl, _) => (-4.0, -1.0),
|
||||||
(Gecko, _) => (-4.0, 0.0),
|
(Gecko, _) => (-4.0, 0.0),
|
||||||
(Turtle, _) => (-6.0, -2.0),
|
(Turtle, _) => (-6.0, -2.0),
|
||||||
(Squirrel, _) => (-5.0, 0.0),
|
(Squirrel, _) => (-4.0, 0.0),
|
||||||
(Fungome, _) => (-4.0, -2.0),
|
(Fungome, _) => (-4.0, -2.0),
|
||||||
(Porcupine, _) => (-6.0, 1.0),
|
(Porcupine, _) => (-6.0, 1.0),
|
||||||
(Beaver, _) => (-6.5, -1.0),
|
(Beaver, _) => (-6.5, -1.0),
|
||||||
@ -263,7 +265,7 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
|||||||
(Axolotl, _) => (0.65),
|
(Axolotl, _) => (0.65),
|
||||||
(Gecko, _) => (0.7),
|
(Gecko, _) => (0.7),
|
||||||
(Turtle, _) => (0.9),
|
(Turtle, _) => (0.9),
|
||||||
(Squirrel, _) => (0.7),
|
(Squirrel, _) => (0.6),
|
||||||
(Fungome, _) => (0.9),
|
(Fungome, _) => (0.9),
|
||||||
(Porcupine, _) => (0.8),
|
(Porcupine, _) => (0.8),
|
||||||
(Hare, _) => (0.8),
|
(Hare, _) => (0.8),
|
||||||
@ -360,6 +362,13 @@ impl<'a> From<&'a Body> for SkeletonAttr {
|
|||||||
(Hare, _) => (1.2),
|
(Hare, _) => (1.2),
|
||||||
_ => (1.0),
|
_ => (1.0),
|
||||||
},
|
},
|
||||||
|
lateral: match (body.species, body.body_type) {
|
||||||
|
(Axolotl, _) => (1.0),
|
||||||
|
(Gecko, _) => (1.0),
|
||||||
|
(Turtle, _) => (1.0),
|
||||||
|
(Fungome, _) => (1.0),
|
||||||
|
_ => (0.0),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,16 +51,16 @@ impl Animation for RunAnimation {
|
|||||||
0.0
|
0.0
|
||||||
} * 1.3;
|
} * 1.3;
|
||||||
let x_tilt = avg_vel.z.atan2(avg_vel.xy().magnitude()) * speednorm;
|
let x_tilt = avg_vel.z.atan2(avg_vel.xy().magnitude()) * speednorm;
|
||||||
|
let vertcancel = 1.0 - s_a.lateral;
|
||||||
next.leg_fl.scale = Vec3::one() * 1.02;
|
next.leg_fl.scale = Vec3::one() * 1.02;
|
||||||
next.leg_fr.scale = Vec3::one() * 1.02;
|
next.leg_fr.scale = Vec3::one() * 1.02;
|
||||||
next.leg_bl.scale = Vec3::one() * 1.02;
|
next.leg_bl.scale = Vec3::one() * 1.02;
|
||||||
next.leg_br.scale = Vec3::one() * 1.02;
|
next.leg_br.scale = Vec3::one() * 1.02;
|
||||||
|
|
||||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||||
next.head.orientation = Quaternion::rotation_x(x_tilt * -0.5 + short * -0.2)
|
next.head.orientation = Quaternion::rotation_x(x_tilt * -0.5 + vertcancel * short * -0.2)
|
||||||
* Quaternion::rotation_y(tilt * 0.8)
|
* Quaternion::rotation_y(tilt * 0.8)
|
||||||
* Quaternion::rotation_z(tilt * -1.2);
|
* Quaternion::rotation_z(s_a.lateral * -short * 0.2 + tilt * -1.2);
|
||||||
|
|
||||||
next.chest.position = Vec3::new(
|
next.chest.position = Vec3::new(
|
||||||
0.0,
|
0.0,
|
||||||
@ -68,9 +68,10 @@ impl Animation for RunAnimation {
|
|||||||
s_a.chest.1 + 2.0 * speednorm * s_a.spring + shortalt * 3.0 * s_a.spring,
|
s_a.chest.1 + 2.0 * speednorm * s_a.spring + shortalt * 3.0 * s_a.spring,
|
||||||
) / 11.0
|
) / 11.0
|
||||||
* s_a.scaler;
|
* s_a.scaler;
|
||||||
next.chest.orientation = Quaternion::rotation_x(short * 0.2 * s_a.spring + x_tilt)
|
next.chest.orientation =
|
||||||
|
Quaternion::rotation_x(vertcancel * short * 0.2 * s_a.spring + x_tilt)
|
||||||
* Quaternion::rotation_y(tilt * 0.8)
|
* Quaternion::rotation_y(tilt * 0.8)
|
||||||
* Quaternion::rotation_z(tilt * -1.5);
|
* Quaternion::rotation_z(s_a.lateral * short * 0.2 + tilt * -1.5);
|
||||||
next.chest.scale = Vec3::one() / 11.0 * s_a.scaler;
|
next.chest.scale = Vec3::one() / 11.0 * s_a.scaler;
|
||||||
|
|
||||||
next.leg_fl.position = Vec3::new(
|
next.leg_fl.position = Vec3::new(
|
||||||
@ -114,9 +115,9 @@ impl Animation for RunAnimation {
|
|||||||
* Quaternion::rotation_z(tilt * -1.5);
|
* Quaternion::rotation_z(tilt * -1.5);
|
||||||
|
|
||||||
next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1);
|
next.tail.position = Vec3::new(0.0, s_a.tail.0, s_a.tail.1);
|
||||||
next.tail.orientation = Quaternion::rotation_x(short * 0.2 + x_tilt)
|
next.tail.orientation = Quaternion::rotation_x(vertcancel * short * 0.2 + x_tilt)
|
||||||
* Quaternion::rotation_y(tilt * 0.8)
|
* Quaternion::rotation_y(tilt * 0.8)
|
||||||
* Quaternion::rotation_z(tilt * 1.5);
|
* Quaternion::rotation_z(s_a.lateral * -short * 0.2 + tilt * 1.5);
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -670,7 +670,7 @@ impl ParticleMgr {
|
|||||||
self.particles.push(Particle::new_directed(
|
self.particles.push(Particle::new_directed(
|
||||||
Duration::from_secs(2),
|
Duration::from_secs(2),
|
||||||
time,
|
time,
|
||||||
ParticleMode::FlameThrower,
|
ParticleMode::GroundShockwave,
|
||||||
position_snapped,
|
position_snapped,
|
||||||
Vec3::new(0.0, 0.0, 10.0) + position_snapped,
|
Vec3::new(0.0, 0.0, 10.0) + position_snapped,
|
||||||
));
|
));
|
||||||
|
Loading…
Reference in New Issue
Block a user