mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add offset to quadmed legs + various fixes and improvements
This commit is contained in:
parent
f164bd2280
commit
ce9cd29720
BIN
assets/voxygen/voxel/npc/mouflon/female/tail.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/npc/mouflon/female/tail.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/npc/mouflon/male/tail.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/npc/mouflon/male/tail.vox
(Stored with Git LFS)
Binary file not shown.
@ -21,7 +21,7 @@
|
||||
central: ("npc.grolgar.male.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.0, -1.0, -1.5),
|
||||
offset: (-4.0, -1.0, 0.0),
|
||||
central: ("npc.grolgar.male.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -51,7 +51,7 @@
|
||||
central: ("npc.grolgar.female.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.0, -1.0, -1.5),
|
||||
offset: (-4.0, -1.0, 0.0),
|
||||
central: ("npc.grolgar.female.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -69,7 +69,7 @@
|
||||
central: ("npc.saber.male.head_lower"),
|
||||
),
|
||||
jaw: (
|
||||
offset: (-2.0, -7.0, -1.5),
|
||||
offset: (-2.5, -7.0, -1.5),
|
||||
central: ("npc.saber.male.jaw"),
|
||||
),
|
||||
torso_front: (
|
||||
@ -81,7 +81,7 @@
|
||||
central: ("npc.saber.male.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-5.5, -1.0, -1.5),
|
||||
offset: (-5.5, -1.0, 0.0),
|
||||
central: ("npc.saber.male.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -99,7 +99,7 @@
|
||||
central: ("npc.saber.female.head_lower"),
|
||||
),
|
||||
jaw: (
|
||||
offset: (-2.0, -7.0, -1.5),
|
||||
offset: (-2.5, -7.0, -1.5),
|
||||
central: ("npc.saber.female.jaw"),
|
||||
),
|
||||
torso_front: (
|
||||
@ -111,7 +111,7 @@
|
||||
central: ("npc.saber.female.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-5.5, -1.0, -1.5),
|
||||
offset: (-5.5, -1.0, 0.0),
|
||||
central: ("npc.saber.female.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -141,7 +141,7 @@
|
||||
central: ("npc.tuskram.male.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-0.5, -0.5, -0.5),
|
||||
offset: (-0.5, -0.5, 0.0),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
tail: (
|
||||
@ -171,7 +171,7 @@
|
||||
central: ("npc.tuskram.female.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-0.5, -0.5, -0.5),
|
||||
offset: (-0.5, -0.5, -0.0),
|
||||
central: ("armor.empty"),
|
||||
),
|
||||
tail: (
|
||||
@ -201,7 +201,7 @@
|
||||
central: ("npc.lion.male.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.5, -1.0, -1.0),
|
||||
offset: (-4.5, -1.0, 0.0),
|
||||
central: ("npc.lion.male.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -231,7 +231,7 @@
|
||||
central: ("npc.lion.female.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.5, -1.0, -1.0),
|
||||
offset: (-4.5, -1.0, 0.0),
|
||||
central: ("npc.lion.female.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -261,7 +261,7 @@
|
||||
central: ("npc.tarasque.male.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-6.0, -1.0, -4.0),
|
||||
offset: (-6.0, -1.0, 0.0),
|
||||
central: ("npc.tarasque.male.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -291,7 +291,7 @@
|
||||
central: ("npc.tarasque.female.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-6.0, -1.0, -4.0),
|
||||
offset: (-6.0, -1.0, 0.0),
|
||||
central: ("npc.tarasque.female.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -321,7 +321,7 @@
|
||||
central: ("npc.tiger.male.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.5, -1.0, -1.0),
|
||||
offset: (-4.5, -1.0, 0.0),
|
||||
central: ("npc.tiger.male.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -351,7 +351,7 @@
|
||||
central: ("npc.tiger.female.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.5, -1.0, -1.0),
|
||||
offset: (-4.5, -1.0, 0.0),
|
||||
central: ("npc.tiger.female.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -381,7 +381,7 @@
|
||||
central: ("npc.wolf.male.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-5.0, -1.0, -2.5),
|
||||
offset: (-5.0, -1.0, 0.0),
|
||||
central: ("npc.wolf.male.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -411,7 +411,7 @@
|
||||
central: ("npc.wolf.female.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-5.0, -1.0, -2.5),
|
||||
offset: (-5.0, -1.0, 0.0),
|
||||
central: ("npc.wolf.female.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -441,7 +441,7 @@
|
||||
central: ("npc.frostfang.male.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.0, -1.0, -1.5),
|
||||
offset: (-4.0, -1.0, 0.0),
|
||||
central: ("npc.frostfang.male.ears"),
|
||||
),
|
||||
tail: (
|
||||
@ -471,7 +471,7 @@
|
||||
central: ("npc.frostfang.female.torso_back"),
|
||||
),
|
||||
ears: (
|
||||
offset: (-4.0, -1.0, -1.5),
|
||||
offset: (-4.0, -1.0, 0.0),
|
||||
central: ("npc.frostfang.female.ears"),
|
||||
),
|
||||
tail: (
|
||||
|
@ -169,10 +169,10 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
Self {
|
||||
head_upper: match (body.species, body.body_type) {
|
||||
(Grolgar, _) => (-8.0, 1.5),
|
||||
(Saber, _) => (0.0, -3.0),
|
||||
(Saber, _) => (-10.0, -3.0),
|
||||
(Tuskram, _) => (2.0, 1.0),
|
||||
(Lion, _) => (2.5, 2.0),
|
||||
(Tarasque, _) => (-5.5, 3.5),
|
||||
(Lion, _) => (12.5, 2.0),
|
||||
(Tarasque, _) => (5.5, 3.5),
|
||||
(Tiger, _) => (2.0, 1.0),
|
||||
(Wolf, _) => (-0.5, 3.0),
|
||||
(Frostfang, _) => (1.0, -2.0),
|
||||
@ -191,10 +191,10 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
},
|
||||
jaw: match (body.species, body.body_type) {
|
||||
(Grolgar, _) => (-2.5, 0.5),
|
||||
(Saber, _) => (12.0, -2.0),
|
||||
(Tuskram, _) => (10.0, -4.0),
|
||||
(Lion, _) => (9.0, -4.5),
|
||||
(Tarasque, _) => (17.5, -10.0),
|
||||
(Saber, _) => (21.0, -2.0),
|
||||
(Tuskram, _) => (1.5, -4.0),
|
||||
(Lion, _) => (0.0, -4.5),
|
||||
(Tarasque, _) => (9.0, -10.0),
|
||||
(Tiger, _) => (7.0, -4.0),
|
||||
(Wolf, _) => (5.0, -3.0),
|
||||
(Frostfang, _) => (5.0, -3.0),
|
||||
@ -209,7 +209,7 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Tiger, _) => (-12.5, -7.0),
|
||||
(Wolf, _) => (-11.0, 0.0),
|
||||
(Frostfang, _) => (-7.0, -3.5),
|
||||
(Mouflon, _) => (-12.0, 1.5),
|
||||
(Mouflon, _) => (-10.5, 3.0),
|
||||
},
|
||||
torso_front: match (body.species, body.body_type) {
|
||||
(Grolgar, _) => (10.0, 11.0),
|
||||
@ -234,14 +234,14 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
|
||||
(Mouflon, _) => (-8.5, -0.5),
|
||||
},
|
||||
ears: match (body.species, body.body_type) {
|
||||
(Grolgar, _) => (5.0, 9.5),
|
||||
(Saber, _) => (12.0, 7.0),
|
||||
(Tuskram, _) => (5.5, 12.5),
|
||||
(Lion, _) => (2.0, 4.5),
|
||||
(Tarasque, _) => (11.0, 1.0),
|
||||
(Tiger, _) => (2.5, 5.0),
|
||||
(Wolf, _) => (3.0, 5.0),
|
||||
(Frostfang, _) => (2.0, 5.0),
|
||||
(Grolgar, _) => (5.0, 8.0),
|
||||
(Saber, _) => (12.0, 5.5),
|
||||
(Tuskram, _) => (5.5, 12.0),
|
||||
(Lion, _) => (-7.0, 3.5),
|
||||
(Tarasque, _) => (2.0, -3.0),
|
||||
(Tiger, _) => (2.5, 4.0),
|
||||
(Wolf, _) => (3.0, 2.5),
|
||||
(Frostfang, _) => (2.0, 3.5),
|
||||
(Mouflon, _) => (2.5, 5.0),
|
||||
},
|
||||
leg_f: match (body.species, body.body_type) {
|
||||
|
@ -66,10 +66,10 @@ impl Animation for RunAnimation {
|
||||
let footrotr = (((1.0)
|
||||
/ (0.5
|
||||
+ (0.5)
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.4).sin())
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.8).sin())
|
||||
.powf(2.0 as f32)))
|
||||
.sqrt())
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.4).sin());
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.8).sin());
|
||||
//
|
||||
let foothorilb = (((5.0)
|
||||
/ (1.0
|
||||
@ -89,14 +89,6 @@ impl Animation for RunAnimation {
|
||||
let footvertrb = (anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.6).sin();
|
||||
|
||||
let footrotlb = (((1.0)
|
||||
/ (0.5
|
||||
+ (0.5)
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.0).sin())
|
||||
.powf(2.0 as f32)))
|
||||
.sqrt())
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.0).sin());
|
||||
|
||||
let footrotrb = (((1.0)
|
||||
/ (0.5
|
||||
+ (0.5)
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.0).sin())
|
||||
@ -104,6 +96,14 @@ impl Animation for RunAnimation {
|
||||
.sqrt())
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.0).sin());
|
||||
|
||||
let footrotrb = (((1.0)
|
||||
/ (0.5
|
||||
+ (0.5)
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.4).sin())
|
||||
.powf(2.0 as f32)))
|
||||
.sqrt())
|
||||
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.4).sin());
|
||||
|
||||
let shortalt = (anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.5).sin();
|
||||
|
||||
let vertchest = (anim_time as f32 * lab as f32 * speedmult + PI * 0.3)
|
||||
@ -160,13 +160,13 @@ impl Animation for RunAnimation {
|
||||
next.torso_front.scale = Vec3::one() * skeleton_attr.scaler / 11.0;
|
||||
|
||||
next.torso_back.offset =
|
||||
Vec3::new(0.0, skeleton_attr.torso_back.0, skeleton_attr.torso_back.1);
|
||||
Vec3::new(0.0, skeleton_attr.torso_back.0, skeleton_attr.torso_back.1 + shortalt * 0.2 - 0.2);
|
||||
next.torso_back.ori =
|
||||
Quaternion::rotation_x(short * -0.03) * Quaternion::rotation_z(tilt * 1.8);
|
||||
next.torso_back.scale = Vec3::one();
|
||||
|
||||
next.ears.offset = Vec3::new(0.0, skeleton_attr.ears.0, skeleton_attr.ears.1);
|
||||
next.ears.ori = Quaternion::rotation_x(0.0);
|
||||
next.ears.ori = Quaternion::rotation_x(shortalt * 0.2 + 0.2);
|
||||
next.ears.scale = Vec3::one() * 1.02;
|
||||
|
||||
////left and right functions currently swapped on some bones to change gait
|
||||
@ -273,13 +273,13 @@ impl Animation for RunAnimation {
|
||||
next.torso_front.scale = Vec3::one() * skeleton_attr.scaler / 11.0;
|
||||
|
||||
next.torso_back.offset =
|
||||
Vec3::new(0.0, skeleton_attr.torso_back.0, skeleton_attr.torso_back.1);
|
||||
Vec3::new(0.0, skeleton_attr.torso_back.0, skeleton_attr.torso_back.1 + shortalt * 0.2 - 0.2);
|
||||
next.torso_back.ori =
|
||||
Quaternion::rotation_x(short * 0.1) * Quaternion::rotation_z(tilt * 1.8);
|
||||
next.torso_back.scale = Vec3::one();
|
||||
|
||||
next.ears.offset = Vec3::new(0.0, skeleton_attr.ears.0, skeleton_attr.ears.1);
|
||||
next.ears.ori = Quaternion::rotation_x(0.0);
|
||||
next.ears.ori = Quaternion::rotation_x(shortalt * 0.2 + 0.2);
|
||||
next.ears.scale = Vec3::one() * 1.02;
|
||||
|
||||
////left and right functions currently swapped on some bones to change gait
|
||||
@ -298,7 +298,7 @@ impl Animation for RunAnimation {
|
||||
skeleton_attr.leg_f.2 + 1.0 + footvertl * -1.0,
|
||||
);
|
||||
next.leg_fr.ori =
|
||||
Quaternion::rotation_x(footrotl * -0.6) * Quaternion::rotation_z(tilt * -0.5);
|
||||
Quaternion::rotation_x(footrotr * -0.6) * Quaternion::rotation_z(tilt * -0.5);
|
||||
next.leg_fr.scale = Vec3::one() * 0.99;
|
||||
|
||||
next.leg_bl.offset = Vec3::new(
|
||||
@ -307,7 +307,7 @@ impl Animation for RunAnimation {
|
||||
skeleton_attr.leg_b.2 + 1.0 + footvertrb * -1.2,
|
||||
);
|
||||
next.leg_bl.ori =
|
||||
Quaternion::rotation_x(footrotrb * -0.6) * Quaternion::rotation_z(tilt * -1.5);
|
||||
Quaternion::rotation_x(footrotlb * -0.6) * Quaternion::rotation_z(tilt * -1.5);
|
||||
next.leg_bl.scale = Vec3::one() * 0.99;
|
||||
|
||||
next.leg_br.offset = Vec3::new(
|
||||
@ -332,7 +332,7 @@ impl Animation for RunAnimation {
|
||||
skeleton_attr.feet_f.1,
|
||||
skeleton_attr.feet_f.2 + 2.0 + ((footvertl * -2.0).max(-1.0)),
|
||||
);
|
||||
next.foot_fr.ori = Quaternion::rotation_x(footrotl * -0.7);
|
||||
next.foot_fr.ori = Quaternion::rotation_x(footrotr * -0.7);
|
||||
next.foot_fr.scale = Vec3::one() * 0.98;
|
||||
|
||||
next.foot_bl.offset = Vec3::new(
|
||||
@ -340,7 +340,7 @@ impl Animation for RunAnimation {
|
||||
skeleton_attr.feet_b.1,
|
||||
skeleton_attr.feet_b.2 + 2.0 + ((footvertrb * -2.0).max(-1.0)),
|
||||
);
|
||||
next.foot_bl.ori = Quaternion::rotation_x(footrotrb * -0.7);
|
||||
next.foot_bl.ori = Quaternion::rotation_x(footrotlb * -0.7);
|
||||
next.foot_bl.scale = Vec3::one() * 0.98;
|
||||
|
||||
next.foot_br.offset = Vec3::new(
|
||||
|
Loading…
Reference in New Issue
Block a user