more run animation work, adjusting pivots

This commit is contained in:
jshipsey 2020-06-26 23:42:06 -04:00
parent 03c1a97ba9
commit c5f7a60f3b
16 changed files with 540 additions and 589 deletions

View File

@ -1,253 +1,253 @@
({
(Crocodile, Male): (
front_left: (
offset: (-3.5, -3.5, -4.0),
offset: (-7.0, -0.0, -4.0),//full x dimension, 0 y dimension, full z dimension
lateral: ("npc.crocodile.male.foot_fl"),
),
front_right: (
offset: (-3.5, -3.5, -4.0),
offset: (0.0, -0.0, -4.0),//0 x dimension, 0 y dimension, full z dimension
lateral: ("npc.crocodile.male.foot_fr"),
),
back_left: (
offset: (-4.0, -2.5, -4.0),
offset: (-8.0, -0.0, -4.0),//full x dimension, 0 y dimension, full z dimension
lateral: ("npc.crocodile.male.foot_bl"),
),
back_right: (
offset: (-4.0, -2.5, -4.0),
offset: (0.0, -0.0, -4.0),//0 x dimension, 0 y dimension, full z dimension
lateral: ("npc.crocodile.male.foot_br"),
),
),
(Crocodile, Female): (
front_left: (
offset: (-3.5, -3.5, -4.0),
offset: (-7.0, -0.0, -4.0),
lateral: ("npc.crocodile.female.foot_fl"),
),
front_right: (
offset: (-3.5, -3.5, -4.0),
offset: (0.0, -0.0, -4.0),
lateral: ("npc.crocodile.female.foot_fr"),
),
back_left: (
offset: (-4.0, -2.5, -4.0),
offset: (-8.0, -0.0, -4.0),
lateral: ("npc.crocodile.female.foot_bl"),
),
back_right: (
offset: (-4.0, -2.5, -4.0),
offset: (0.0, -0.0, -4.0),
lateral: ("npc.crocodile.female.foot_br"),
),
),
(Alligator, Male): (
front_left: (
offset: (-3.5, -3.5, -4.0),
offset: (-7.0, 0.0, -4.0),
lateral: ("npc.alligator.male.foot_fl"),
),
front_right: (
offset: (-3.5, -3.5, -4.0),
offset: (-0.0, 0.0, -4.0),
lateral: ("npc.alligator.male.foot_fr"),
),
back_left: (
offset: (-4.0, -2.5, -4.0),
offset: (-8.0, 0.0, -4.0),
lateral: ("npc.alligator.male.foot_bl"),
),
back_right: (
offset: (-4.0, -2.5, -4.0),
offset: (-0.0, 0.0, -4.0),
lateral: ("npc.alligator.male.foot_br"),
),
),
(Alligator, Female): (
front_left: (
offset: (-3.5, -3.5, -4.0),
offset: (-7.0, 0.0, -4.0),
lateral: ("npc.alligator.female.foot_fl"),
),
front_right: (
offset: (-3.5, -3.5, -4.0),
offset: (0.0, 0.0, -4.0),
lateral: ("npc.alligator.female.foot_fr"),
),
back_left: (
offset: (-4.0, -2.5, -4.0),
offset: (-8.0, 0.0, -4.0),
lateral: ("npc.alligator.female.foot_bl"),
),
back_right: (
offset: (-4.0, -2.5, -4.0),
offset: (0.0, 0.0, -4.0),
lateral: ("npc.alligator.female.foot_br"),
),
),
(Salamander, Male): (
front_left: (
offset: (-3.0, -3.5, -3.0),
offset: (-6.0, 0.0, -3.0),
lateral: ("npc.salamander.male.foot_fl"),
),
front_right: (
offset: (-3.0, -3.5, -3.0),
offset: (0.0, 0.0, -3.0),
lateral: ("npc.salamander.male.foot_fr"),
),
back_left: (
offset: (-3.5, -2.5, -3.0),
offset: (-7.0, 0.0, -3.0),
lateral: ("npc.salamander.male.foot_bl"),
),
back_right: (
offset: (-3.5, -2.5, -3.0),
offset: (-0.0, 0.0, -3.0),
lateral: ("npc.salamander.male.foot_br"),
),
),
(Salamander, Female): (
front_left: (
offset: (-3.0, -3.5, -3.0),
offset: (-6.0, 0.0, -3.0),
lateral: ("npc.salamander.female.foot_fl"),
),
front_right: (
offset: (-3.0, -3.5, -3.0),
offset: (0.0, 0.0, -3.0),
lateral: ("npc.salamander.female.foot_fr"),
),
back_left: (
offset: (-3.5, -2.5, -3.0),
offset: (-7.0, 0.0, -3.0),
lateral: ("npc.salamander.female.foot_bl"),
),
back_right: (
offset: (-3.5, -2.5, -3.0),
offset: (0.0, 0.0, -3.0),
lateral: ("npc.salamander.female.foot_br"),
),
),
(Monitor, Male): (
front_left: (
offset: (-4.0, -3.5, -5.0),
offset: (-8.0, 0.0, -5.0),
lateral: ("npc.monitor.male.foot_fl"),
),
front_right: (
offset: (-4.0, -3.5, -5.0),
offset: (0.0, 0.0, -5.0),
lateral: ("npc.monitor.male.foot_fr"),
),
back_left: (
offset: (-3.5, -2.5, -5.0),
offset: (-7.0, 0.0, -5.0),
lateral: ("npc.monitor.male.foot_bl"),
),
back_right: (
offset: (-3.5, -2.5, -5.0),
offset: (0.0, 0.0, -5.0),
lateral: ("npc.monitor.male.foot_br"),
),
),
(Monitor, Female): (
front_left: (
offset: (-4.0, -3.5, -5.0),
offset: (-8.0, 0.0, -5.0),
lateral: ("npc.monitor.female.foot_fl"),
),
front_right: (
offset: (-4.0, -3.5, -5.0),
offset: (0.0, 0.0, -5.0),
lateral: ("npc.monitor.female.foot_fr"),
),
back_left: (
offset: (-3.5, -2.5, -5.0),
offset: (-7.0, 0.0, -5.0),
lateral: ("npc.monitor.female.foot_bl"),
),
back_right: (
offset: (-3.5, -2.5, -5.0),
offset: (0.0, 0.0, -5.0),
lateral: ("npc.monitor.female.foot_br"),
),
),
(Asp, Male): (
front_left: (
offset: (-5.5, -3.5, -7.0),
offset: (-11.0, 0.0, -7.0),
lateral: ("npc.asp.male.foot_fl"),
),
front_right: (
offset: (-5.5, -3.5, -7.0),
offset: (0.0, 0.0, -7.0),
lateral: ("npc.asp.male.foot_fr"),
),
back_left: (
offset: (-4.5, -2.5, -7.0),
offset: (-9.0, 0.0, -7.0),
lateral: ("npc.asp.male.foot_bl"),
),
back_right: (
offset: (-4.5, -2.5, -7.0),
offset: (0.0, 0.0, -7.0),
lateral: ("npc.asp.male.foot_br"),
),
),
(Asp, Female): (
front_left: (
offset: (-5.5, -3.5, -7.0),
offset: (-11.0, 0.0, -7.0),
lateral: ("npc.asp.female.foot_fl"),
),
front_right: (
offset: (-5.5, -3.5, -7.0),
offset: (0.0, 0.0, -7.0),
lateral: ("npc.asp.female.foot_fr"),
),
back_left: (
offset: (-4.5, -2.5, -7.0),
offset: (-9.0, 0.0, -7.0),
lateral: ("npc.asp.female.foot_bl"),
),
back_right: (
offset: (-4.5, -2.5, -7.0),
offset: (0.0, 0.0, -7.0),
lateral: ("npc.asp.female.foot_br"),
),
),
(Tortoise, Male): (
front_left: (
offset: (-3.5, -4.0, -8.0),
offset: (-7.0, 0.0, -8.0),
lateral: ("npc.tortoise.male.foot_fl"),
),
front_right: (
offset: (-3.5, -4.0, -8.0),
offset: (0.0, 0.0, -8.0),
lateral: ("npc.tortoise.male.foot_fr"),
),
back_left: (
offset: (-3.5, -3.0, -8.0),
offset: (-7.0, 0.0, -8.0),
lateral: ("npc.tortoise.male.foot_bl"),
),
back_right: (
offset: (-3.5, -3.0, -8.0),
offset: (0.0, 0.0, -8.0),
lateral: ("npc.tortoise.male.foot_br"),
),
),
(Tortoise, Female): (
front_left: (
offset: (-3.5, -4.0, -8.0),
offset: (-7.0, 0.0, -8.0),
lateral: ("npc.tortoise.female.foot_fl"),
),
front_right: (
offset: (-3.5, -4.0, -8.0),
offset: (0.0, 0.0, -8.0),
lateral: ("npc.tortoise.female.foot_fr"),
),
back_left: (
offset: (-3.5, -3.0, -8.0),
offset: (-7.0, 0.0, -8.0),
lateral: ("npc.tortoise.female.foot_bl"),
),
back_right: (
offset: (-3.5, -3.0, -8.0),
offset: (0.0, 0.0, -8.0),
lateral: ("npc.tortoise.female.foot_br"),
),
),
(Rocksnapper, Male): (
front_left: (
offset: (-6.0, -6.5, -10.0),
offset: (-12.0, 0.0, -10.0),
lateral: ("npc.rocksnapper.male.foot_fl"),
),
front_right: (
offset: (-6.0, -6.5, -10.0),
offset: (0.0, 0.0, -10.0),
lateral: ("npc.rocksnapper.male.foot_fr"),
),
back_left: (
offset: (-5.5, -4.5, -9.0),
offset: (-11.0, 0.0, -9.0),
lateral: ("npc.rocksnapper.male.foot_bl"),
),
back_right: (
offset: (-5.5, -4.5, -9.0),
offset: (0.0, 0.0, -9.0),
lateral: ("npc.rocksnapper.male.foot_br"),
),
),
(Rocksnapper, Female): (
front_left: (
offset: (-6.0, -6.5, -10.0),
offset: (-12.0, 0.0, -10.0),
lateral: ("npc.rocksnapper.female.foot_fl"),
),
front_right: (
offset: (-6.0, -6.5, -10.0),
offset: (0.0, 0.0, -10.0),
lateral: ("npc.rocksnapper.female.foot_fr"),
),
back_left: (
offset: (-5.5, -4.5, -9.0),
offset: (-11.0, -6.0, -9.0),//special case
lateral: ("npc.rocksnapper.female.foot_bl"),
),
back_right: (
offset: (-5.5, -4.5, -9.0),
offset: (0.0, -6.0, -9.0),
lateral: ("npc.rocksnapper.female.foot_br"),
),
),

View File

@ -437,7 +437,7 @@
central: ("npc.frostfang.male.torso_front"),
),
torso_back: (
offset: (-3.0, -4.0, -4.5),
offset: (-3.0, -8.0, -4.5),
central: ("npc.frostfang.male.torso_back"),
),
ears: (
@ -467,7 +467,7 @@
central: ("npc.frostfang.female.torso_front"),
),
torso_back: (
offset: (-3.0, -4.0, -4.5),
offset: (-3.0, -8.0, -4.5),
central: ("npc.frostfang.female.torso_back"),
),
ears: (

View File

@ -17,19 +17,19 @@
lateral: ("npc.grolgar.male.leg_br"),
),
foot_fl: (
offset: (-2.5, -9.0, -6.0),//y pivot should be -3/4 of the y dimension of the model
offset: (-2.5, -3.0, -6.0),//y pivot should be -1/4 of the y dimension of the model
lateral: ("npc.grolgar.male.foot_fl"),
),
foot_fr: (
offset: (-2.5, -9.0, -6.0),//y pivot should be -3/4 of the y dimension of the model
offset: (-2.5, -3.0, -6.0),//y pivot should be -1/4 of the y dimension of the model
lateral: ("npc.grolgar.male.foot_fr"),
),
foot_bl: (
offset: (-2.5, -2.0, -4.0),//y pivot should be -3/4 of the y dimension of the model
offset: (-2.5, -2.0, -4.0),//y pivot should be -1/4 of the y dimension of the model
lateral: ("npc.grolgar.male.foot_bl"),
),
foot_br: (
offset: (-2.5, -2.0, -4.0),//y pivot should be -3/4 of the y dimension of the model
offset: (-2.5, -2.0, -4.0),//y pivot should be -1/4 of the y dimension of the model
lateral: ("npc.grolgar.male.foot_br"),
),
),
@ -51,7 +51,7 @@
lateral: ("npc.grolgar.female.leg_br"),
),
foot_fl: (
offset: (-2.5, -9.0, -6.0),
offset: (-2.5, -3.0, -6.0),
lateral: ("npc.grolgar.female.foot_fl"),
),
foot_fr: (
@ -85,19 +85,19 @@
lateral: ("npc.saber.male.leg_br"),
),
foot_fl: (
offset: (-2.5, -5.0, -8.0),
offset: (-2.5, -2.5, -8.0),
lateral: ("npc.saber.male.foot_fl"),
),
foot_fr: (
offset: (-2.5, -5.0, -8.0),
offset: (-2.5, -2.5, -8.0),
lateral: ("npc.saber.male.foot_fr"),
),
foot_bl: (
offset: (-2.5, -3.5, -9.0),
offset: (-2.5, -2.0, -9.0),
lateral: ("npc.saber.male.foot_bl"),
),
foot_br: (
offset: (-2.5, -3.5, -9.0),
offset: (-2.5, -2.0, -9.0),
lateral: ("npc.saber.male.foot_br"),
),
),
@ -119,19 +119,19 @@
lateral: ("npc.saber.female.leg_br"),
),
foot_fl: (
offset: (-2.5, -5.0, -8.0),
offset: (-2.5, -2.5, -8.0),
lateral: ("npc.saber.female.foot_fl"),
),
foot_fr: (
offset: (-2.5, -5.0, -8.0),
offset: (-2.5, -2.5, -8.0),
lateral: ("npc.saber.female.foot_fr"),
),
foot_bl: (
offset: (-2.5, -3.5, -9.0),
offset: (-2.5, -2.0, -9.0),
lateral: ("npc.saber.female.foot_bl"),
),
foot_br: (
offset: (-2.5, -3.5, -9.0),
offset: (-2.5, -2.0, -9.0),
lateral: ("npc.saber.female.foot_br"),
),
),
@ -153,19 +153,19 @@
lateral: ("npc.tuskram.male.leg_br"),
),
foot_fl: (
offset: (-2.5, -3.5, -5.0),
offset: (-2.5, -2.0, -5.0),
lateral: ("npc.tuskram.male.foot_fl"),
),
foot_fr: (
offset: (-2.5, -3.5, -5.0),
offset: (-2.5, -2.0, -5.0),
lateral: ("npc.tuskram.male.foot_fr"),
),
foot_bl: (
offset: (-1.5, -2.5, -6.0),
offset: (-1.5, -1.5, -6.0),
lateral: ("npc.tuskram.male.foot_bl"),
),
foot_br: (
offset: (-1.5, -2.5, -6.0),
offset: (-1.5, -1.5, -6.0),
lateral: ("npc.tuskram.male.foot_br"),
),
),
@ -187,19 +187,19 @@
lateral: ("npc.tuskram.female.leg_br"),
),
foot_fl: (
offset: (-2.5, -3.5, -5.0),
offset: (-2.5, -2.0, -5.0),
lateral: ("npc.tuskram.female.foot_fl"),
),
foot_fr: (
offset: (-2.5, -3.5, -5.0),
offset: (-2.5, -2.0, -5.0),
lateral: ("npc.tuskram.female.foot_fr"),
),
foot_bl: (
offset: (-1.5, -2.5, -6.0),
offset: (-1.5, -1.5, -6.0),
lateral: ("npc.tuskram.female.foot_bl"),
),
foot_br: (
offset: (-1.5, -2.5, -6.0),
offset: (-1.5, -1.5, -6.0),
lateral: ("npc.tuskram.female.foot_br"),
),
),
@ -221,11 +221,11 @@
lateral: ("npc.lion.male.leg_br"),
),
foot_fl: (
offset: (-2.5, -2.0, -2.5),
offset: (-2.5, -2.0, -5.0),
lateral: ("npc.lion.male.foot_fl"),
),
foot_fr: (
offset: (-2.5, -2.0, -2.5),
offset: (-2.5, -2.0, -5.0),
lateral: ("npc.lion.male.foot_fr"),
),
foot_bl: (
@ -255,11 +255,11 @@
lateral: ("npc.lion.female.leg_br"),
),
foot_fl: (
offset: (-2.5, -2.0, -2.5),
offset: (-2.5, -2.0, -5.0),
lateral: ("npc.lion.female.foot_fl"),
),
foot_fr: (
offset: (-2.5, -2.0, -2.5),
offset: (-2.5, -2.0, -5.0),
lateral: ("npc.lion.female.foot_fr"),
),
foot_bl: (
@ -289,19 +289,19 @@
lateral: ("npc.tarasque.male.leg_br"),
),
foot_fl: (
offset: (-4.0, -9.0, -9.0),
offset: (-4.0, -3.0, -9.0),
lateral: ("npc.tarasque.male.foot_fl"),
),
foot_fr: (
offset: (-4.0, -9.0, -9.0),
offset: (-4.0, -3.0, -9.0),
lateral: ("npc.tarasque.male.foot_fr"),
),
foot_bl: (
offset: (-2.5, -6.0, -8.0),
offset: (-2.5, -2.0, -8.0),
lateral: ("npc.tarasque.male.foot_bl"),
),
foot_br: (
offset: (-2.5, -6.0, -8.0),
offset: (-2.5, -2.0, -8.0),
lateral: ("npc.tarasque.male.foot_br"),
),
),
@ -323,19 +323,19 @@
lateral: ("npc.tarasque.female.leg_br"),
),
foot_fl: (
offset: (-4.0, -9.0, -9.0), //(1/4) Y dimension, (1/1) Z dimension
offset: (-4.0, -3.0, -9.0), //(1/4) Y dimension, (1/1) Z dimension
lateral: ("npc.tarasque.female.foot_fl"),
),
foot_fr: (
offset: (-4.0, -9.0, -9.0), //(1/4) Y dimension, (1/1) Z dimension
offset: (-4.0, -3.0, -9.0), //(1/4) Y dimension, (1/1) Z dimension
lateral: ("npc.tarasque.female.foot_fr"),
),
foot_bl: (
offset: (-2.5, -6.0, -8.0),
offset: (-2.5, -2.0, -8.0),
lateral: ("npc.tarasque.female.foot_bl"),
),
foot_br: (
offset: (-2.5, -6.0, -8.0),
offset: (-2.5, -2.0, -8.0),
lateral: ("npc.tarasque.female.foot_br"),
),
),
@ -357,19 +357,19 @@
lateral: ("npc.tiger.male.leg_br"),
),
foot_fl: (
offset: (-2.5, -6.0, -6.0),
offset: (-2.5, -2.0, -6.0),
lateral: ("npc.tiger.male.foot_fl"),
),
foot_fr: (
offset: (-2.5, -6.0, -6.0),
offset: (-2.5, -2.0, -6.0),
lateral: ("npc.tiger.male.foot_fr"),
),
foot_bl: (
offset: (-2.5, -5.0, -6.0),
offset: (-2.5, -2.0, -6.0),
lateral: ("npc.tiger.male.foot_bl"),
),
foot_br: (
offset: (-2.5, -5.0, -6.0),
offset: (-2.5, -2.0, -6.0),
lateral: ("npc.tiger.male.foot_br"),
),
),
@ -391,19 +391,19 @@
lateral: ("npc.tiger.female.leg_br"),
),
foot_fl: (
offset: (-2.5, -6.0, -6.0),
offset: (-2.5, -2.0, -6.0),
lateral: ("npc.tiger.female.foot_fl"),
),
foot_fr: (
offset: (-2.5, -6.0, -6.0),
offset: (-2.5, -2.0, -6.0),
lateral: ("npc.tiger.female.foot_fr"),
),
foot_bl: (
offset: (-2.5, -5.0, -6.0),
offset: (-2.5, -2.0, -6.0),
lateral: ("npc.tiger.female.foot_bl"),
),
foot_br: (
offset: (-2.5, -5.0, -6.0),
offset: (-2.5, -2.0, -6.0),
lateral: ("npc.tiger.female.foot_br"),
),
),
@ -425,19 +425,19 @@
lateral: ("npc.wolf.male.leg_br"),
),
foot_fl: (
offset: (-1.5, -4.0, -9.0),
offset: (-1.5, -1.5, -9.0),
lateral: ("npc.wolf.male.foot_fl"),
),
foot_fr: (
offset: (-1.5, -4.0, -9.0),
offset: (-1.5, -1.5, -9.0),
lateral: ("npc.wolf.male.foot_fr"),
),
foot_bl: (
offset: (-1.5, -4.0, -9.0),
offset: (-1.5, -1.5, -9.0),
lateral: ("npc.wolf.male.foot_bl"),
),
foot_br: (
offset: (-1.5, -4.0, -9.0),
offset: (-1.5, -1.5, -9.0),
lateral: ("npc.wolf.male.foot_br"),
),
),
@ -459,19 +459,19 @@
lateral: ("npc.wolf.female.leg_br"),
),
foot_fl: (
offset: (-1.5, -4.0, -9.0),
offset: (-1.5, -1.5, -9.0),
lateral: ("npc.wolf.female.foot_fl"),
),
foot_fr: (
offset: (-1.5, -4.0, -9.0),
offset: (-1.5, -1.5, -9.0),
lateral: ("npc.wolf.female.foot_fr"),
),
foot_bl: (
offset: (-1.5, -4.0, -9.0),
offset: (-1.5, -1.5, -9.0),
lateral: ("npc.wolf.female.foot_bl"),
),
foot_br: (
offset: (-1.5, -4.0, -9.0),
offset: (-1.5, -1.5, -9.0),
lateral: ("npc.wolf.female.foot_br"),
),
),
@ -493,19 +493,19 @@
lateral: ("npc.frostfang.male.leg_br"),
),
foot_fl: (
offset: (-2.5, -4.0, -6.0),
offset: (-2.5, -1.5, -6.0),
lateral: ("npc.frostfang.male.foot_fl"),
),
foot_fr: (
offset: (-2.5, -4.0, -6.0),
offset: (-2.5, -1.5, -6.0),
lateral: ("npc.frostfang.male.foot_fr"),
),
foot_bl: (
offset: (-2.5, -4.0, -6.0),
offset: (-2.5, -1.5, -6.0),
lateral: ("npc.frostfang.male.foot_bl"),
),
foot_br: (
offset: (-2.5, -4.0, -6.0),
offset: (-2.5, -1.5, -6.0),
lateral: ("npc.frostfang.male.foot_br"),
),
),
@ -527,19 +527,19 @@
lateral: ("npc.frostfang.female.leg_br"),
),
foot_fl: (
offset: (-2.5, -4.0, -6.0),
offset: (-2.5, -1.5, -6.0),
lateral: ("npc.frostfang.female.foot_fl"),
),
foot_fr: (
offset: (-2.5, -4.0, -6.0),
offset: (-2.5, -1.5, -6.0),
lateral: ("npc.frostfang.female.foot_fr"),
),
foot_bl: (
offset: (-2.5, -4.0, -6.0),
offset: (-2.5, -1.5, -6.0),
lateral: ("npc.frostfang.female.foot_bl"),
),
foot_br: (
offset: (-2.5, -4.0, -6.0),
offset: (-2.5, -1.5, -6.0),
lateral: ("npc.frostfang.female.foot_br"),
),
),
@ -561,19 +561,19 @@
lateral: ("npc.mouflon.male.leg_br"),
),
foot_fl: (
offset: (-1.0, -3.0, -7.0),
offset: (-1.0, -1.0, -7.0),
lateral: ("npc.mouflon.male.foot_fl"),
),
foot_fr: (
offset: (-1.0, -3.0, -7.0),
offset: (-1.0, -1.0, -7.0),
lateral: ("npc.mouflon.male.foot_fr"),
),
foot_bl: (
offset: (-1.0, -2.0, -6.0),
offset: (-1.0, -0.5, -6.0),
lateral: ("npc.mouflon.male.foot_bl"),
),
foot_br: (
offset: (-1.0, -2.0, -6.0),
offset: (-1.0, -0.5, -6.0),
lateral: ("npc.mouflon.male.foot_br"),
),
),
@ -595,19 +595,19 @@
lateral: ("npc.mouflon.female.leg_br"),
),
foot_fl: (
offset: (-1.0, -3.0, -7.0),
offset: (-1.0, -1.0, -7.0),
lateral: ("npc.mouflon.female.foot_fl"),
),
foot_fr: (
offset: (-1.0, -3.0, -7.0),
offset: (-1.0, -1.0, -7.0),
lateral: ("npc.mouflon.female.foot_fr"),
),
foot_bl: (
offset: (-1.0, -2.0, -6.0),
offset: (-1.0, -0.5, -6.0),
lateral: ("npc.mouflon.female.foot_bl"),
),
foot_br: (
offset: (-1.0, -2.0, -6.0),
offset: (-1.0, -0.5, -6.0),
lateral: ("npc.mouflon.female.foot_br"),
),
),

View File

@ -8,9 +8,9 @@ pub mod fish_small;
pub mod golem;
pub mod humanoid;
pub mod object;
pub mod quadruped_low;
pub mod quadruped_medium;
pub mod quadruped_small;
pub mod quadruped_low;
use crate::{
assets::{self, Asset},

View File

@ -23,7 +23,7 @@ pub use admin::{Admin, AdminList};
pub use agent::{Agent, Alignment};
pub use body::{
biped_large, bird_medium, bird_small, critter, dragon, fish_medium, fish_small, golem,
humanoid, object, quadruped_medium, quadruped_small, quadruped_low, AllBodies, Body, BodyData,
humanoid, object, quadruped_low, quadruped_medium, quadruped_small, AllBodies, Body, BodyData,
};
pub use character_state::{Attacking, CharacterState, StateUpdate};
pub use chat::{ChatMode, ChatMsg, ChatType, Faction, Group, SpeechBubble, SpeechBubbleType};

View File

@ -13,9 +13,9 @@ pub mod fish_small;
pub mod fixture;
pub mod golem;
pub mod object;
pub mod quadruped_low;
pub mod quadruped_medium;
pub mod quadruped_small;
pub mod quadruped_low;
#[cfg(feature = "use-dyn-lib")]
pub use dyn_lib::init;

View File

@ -21,8 +21,8 @@ impl Animation for IdleAnimation {
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let ultra_slow = 0.0*(anim_time as f32 * 1.0).sin();
let slow = 0.0*(anim_time as f32 * 2.5).sin();
let ultra_slow = 0.0 * (anim_time as f32 * 1.0).sin();
let slow = 0.0 * (anim_time as f32 * 2.5).sin();
let slowalt = (anim_time as f32 * 2.5 + PI / 2.0).sin();
let dragon_look = Vec2::new(
@ -53,37 +53,33 @@ impl Animation for IdleAnimation {
skeleton_attr.head_lower.1 + ultra_slow * 0.20,
);
next.head_lower.ori = Quaternion::rotation_z(0.8 * dragon_look.x)
* Quaternion::rotation_x( 0.8 * dragon_look.y);
* Quaternion::rotation_x(0.8 * dragon_look.y);
next.head_lower.scale = Vec3::one();
next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
next.jaw.ori = Quaternion::rotation_x(slow * 0.04);
next.jaw.scale = Vec3::one()*0.98;
next.jaw.scale = Vec3::one() * 0.98;
next.chest.offset = Vec3::new(
0.0,
skeleton_attr.chest.0,
skeleton_attr.chest.1,
)/6.0;
next.chest.offset = Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1) / 6.0;
next.chest.ori = Quaternion::rotation_y(slow * 0.01);
next.chest.scale = Vec3::one() /6.0;
next.chest.scale = Vec3::one() / 6.0;
next.tail_front.offset =
Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1);
next.tail_front.ori = Quaternion::rotation_x(0.15)*Quaternion::rotation_z(slowalt * 0.12);
next.tail_front.scale = Vec3::one()*0.98;
next.tail_front.ori = Quaternion::rotation_x(0.15) * Quaternion::rotation_z(slowalt * 0.12);
next.tail_front.scale = Vec3::one() * 0.98;
next.tail_rear.offset =
Vec3::new(0.0, skeleton_attr.tail_rear.0, skeleton_attr.tail_rear.1);
next.tail_rear.ori = Quaternion::rotation_z(slowalt * 0.12)*Quaternion::rotation_x(-0.12);
next.tail_rear.scale = Vec3::one()*0.98;
next.tail_rear.ori = Quaternion::rotation_z(slowalt * 0.12) * Quaternion::rotation_x(-0.12);
next.tail_rear.scale = Vec3::one() * 0.98;
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2,
);
next.foot_fl.ori = Quaternion::rotation_x(0.0);
next.foot_fl.ori = Quaternion::rotation_z(0.0);
next.foot_fl.scale = Vec3::one();
next.foot_fr.offset = Vec3::new(

View File

@ -75,11 +75,7 @@ impl Animation for JumpAnimation {
next.tail_rear.ori = Quaternion::rotation_x(center * 0.03);
next.tail_rear.scale = Vec3::one() * 0.98;
next.chest.offset = Vec3::new(
0.0,
skeleton_attr.chest.0,
skeleton_attr.chest.1,
);
next.chest.offset = Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1);
next.chest.ori = Quaternion::rotation_y(center * 0.05);
next.chest.scale = Vec3::one();

View File

@ -45,10 +45,7 @@ impl Skeleton for QuadrupedLowSkeleton {
FigureBoneData::new(chest_mat * head_lower_mat * head_upper_mat),
FigureBoneData::new(chest_mat * head_lower_mat),
FigureBoneData::new(
chest_mat
* head_lower_mat
* head_upper_mat
* self.jaw.compute_base_matrix(),
chest_mat * head_lower_mat * head_upper_mat * self.jaw.compute_base_matrix(),
),
FigureBoneData::new(chest_mat),
FigureBoneData::new(chest_mat * self.tail_front.compute_base_matrix()),
@ -57,10 +54,10 @@ impl Skeleton for QuadrupedLowSkeleton {
* self.tail_front.compute_base_matrix()
* self.tail_rear.compute_base_matrix(),
),
FigureBoneData::new(chest_mat*self.foot_fl.compute_base_matrix()),
FigureBoneData::new(chest_mat*self.foot_fr.compute_base_matrix()),
FigureBoneData::new(chest_mat*self.foot_bl.compute_base_matrix()),
FigureBoneData::new(chest_mat*self.foot_br.compute_base_matrix()),
FigureBoneData::new(chest_mat * self.foot_fl.compute_base_matrix()),
FigureBoneData::new(chest_mat * self.foot_fr.compute_base_matrix()),
FigureBoneData::new(chest_mat * self.foot_bl.compute_base_matrix()),
FigureBoneData::new(chest_mat * self.foot_br.compute_base_matrix()),
FigureBoneData::default(),
FigureBoneData::default(),
FigureBoneData::default(),
@ -161,7 +158,7 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Monitor, _) => (0.0, 5.0),
(Asp, _) => (0.0, 8.0),
(Tortoise, _) => (0.0, 11.0),
(Rocksnapper, _) => (0.0, 16.5),
(Rocksnapper, _) => (0.0, 18.5),
},
tail_rear: match (body.species, body.body_type) {
(Crocodile, _) => (-12.5, -1.0),
@ -182,22 +179,22 @@ impl<'a> From<&'a comp::quadruped_low::Body> for SkeletonAttr {
(Rocksnapper, _) => (-13.5, -6.5),
},
feet_f: match (body.species, body.body_type) {
(Crocodile, _) => (6.0, 6.0, -1.0),
(Alligator, _) => (6.75, 6.25, -1.0),
(Salamander, _) => (6.0, 6.0, -2.0),
(Monitor, _) => (6.0, 6.0, 0.0),
(Asp, _) => (6.5, 6.0, -1.0),
(Tortoise, _) => (8.5, 9.5, -3.0),
(Rocksnapper, _) => (12.5, 10.0, -6.5),
(Crocodile, _) => (3.5, 6.0, -1.0),
(Alligator, _) => (5.5, 4.25, -1.0),
(Salamander, _) => (5.0, 5.0, -2.0),
(Monitor, _) => (4.0, 5.0, 0.0),
(Asp, _) => (1.5, 4.0, -1.0),
(Tortoise, _) => (5.5, 9.5, -3.0),
(Rocksnapper, _) => (7.5, 5.0, -8.5),
},
feet_b: match (body.species, body.body_type) {
(Crocodile, _) => (6.0, -6.0, -1.0),
(Alligator, _) => (6.5, -4.5, -1.0),
(Salamander, _) => (6.0, -6.0, -2.0),
(Monitor, _) => (6.0, -6.0, 0.0),
(Asp, _) => (6.5, -3.5, -1.0),
(Tortoise, _) => (8.0, -8.5, -3.0),
(Rocksnapper, _) => (12.0, -12.0, -7.5),
(Crocodile, _) => (3.5, -6.0, -1.0),
(Alligator, _) => (5.5, -5.5, -1.0),
(Salamander, _) => (4.0, -6.0, -2.0),
(Monitor, _) => (4.0, -6.0, 0.0),
(Asp, _) => (2.5, -5.5, -1.0),
(Tortoise, _) => (7.0, -9.5, -3.0),
(Rocksnapper, _) => (9.0, -14.0, -9.5),
},
}
}

View File

@ -21,121 +21,101 @@ impl Animation for RunAnimation {
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let lab = 0.5;
let lab = 0.7;
let center = (anim_time as f32 * lab as f32 + PI / 2.0).sin();
let centeroffset = (anim_time as f32 * lab as f32 + PI * 1.5).sin();
let short = (((5.0)
/ (3.6
+ 1.4 * ((anim_time as f32 *16.0* lab as f32+ PI * 0.25).sin()).powf(2.0 as f32)))
let short = (((0.0)
/ (0.72
+ 0.28
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.25).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 *16.0* lab as f32+ PI * 0.25).sin());
let shortalt = (anim_time as f32 *16.0* lab as f32 + PI * 0.25).sin();
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.25).sin());
let shortalt = (anim_time as f32 * 16.0 * lab as f32 + PI * 0.25).sin();
let foothoril = (((5.0)
/ (1.0
+ (4.0)
let foothoril = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.45).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.45).sin());
let foothorir = (((5.0)
/ (1.0
+ (4.0)
* ((anim_time as f32 * 16.0 * lab as f32 + PI *0.45).sin())
let foothorir = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.45).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.45).sin());
let footvertl = (anim_time as f32 * 16.0 * lab as f32+PI*0.0).sin();
let footvertl = (anim_time as f32 * 16.0 * lab as f32 + PI * 0.0).sin();
let footvertr = (anim_time as f32 * 16.0 * lab as f32 + PI).sin();
let footrotl = (((5.0)
/ (0.5
+ (4.5)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin())
.powf(2.0 as f32)))
let footrotl = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin());
let footrotr = (((5.0)
/ (0.5
+ (4.5)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin())
.powf(2.0 as f32)))
let footrotr = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin());
//
let foothorilb = (((5.0)
/ (1.0
+ (4.0)
* ((anim_time as f32 * 16.0 * lab as f32 + PI *1.25).sin())
//
let foothorilb = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.25).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.25).sin());
let foothorirb = (((5.0)
/ (1.0
+ (4.0)
* ((anim_time as f32 * 16.0 * lab as f32 + PI *0.25).sin())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.25).sin());
let foothorirb = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.25).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.25).sin());
let footvertlb = (anim_time as f32 * 16.0 * lab as f32+PI*(-0.2)).sin();
let footvertrb = (anim_time as f32 * 16.0 * lab as f32 + PI*0.8).sin();
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.25).sin());
let footvertlb = (anim_time as f32 * 16.0 * lab as f32 + PI * (-0.2)).sin();
let footvertrb = (anim_time as f32 * 16.0 * lab as f32 + PI * 0.8).sin();
let footrotlb = (((5.0)
/ (0.5
+ (4.5)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.2).sin())
.powf(2.0 as f32)))
let footrotlb = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.2).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.2).sin());
let footrotrb = (((5.0)
/ (0.5
+ (4.5)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.2).sin())
.powf(2.0 as f32)))
let footrotrb = (((1.0)
/ (0.4
+ (0.6)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.2).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.2).sin());
next.head_upper.offset =
Vec3::new(0.0, skeleton_attr.head_upper.0, skeleton_attr.head_upper.1);
next.head_upper.ori =
Quaternion::rotation_x(0.0) * Quaternion::rotation_z(short*-0.06);
next.head_upper.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_z(short * -0.06);
next.head_upper.scale = Vec3::one();
next.head_lower.offset =
Vec3::new(0.0, skeleton_attr.head_lower.0, skeleton_attr.head_lower.1);
next.head_lower.ori = Quaternion::rotation_x(0.0)* Quaternion::rotation_z(short*-0.15);
next.head_lower.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_z(short * -0.15);
next.head_lower.scale = Vec3::one();
next.jaw.offset = Vec3::new(
0.0,
skeleton_attr.jaw.0,
skeleton_attr.jaw.1,
);
next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
next.jaw.ori = Quaternion::rotation_x(0.0);
next.jaw.scale = Vec3::one()*0.98;
next.jaw.scale = Vec3::one() * 0.98;
next.tail_front.offset = Vec3::new(
0.0,
skeleton_attr.tail_front.0,
skeleton_attr.tail_front.1,
);
next.tail_front.ori = Quaternion::rotation_z(shortalt*0.18)*Quaternion::rotation_y(shortalt*0.1)*Quaternion::rotation_x(0.06);
next.tail_front.offset =
Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1);
next.tail_front.ori = Quaternion::rotation_z(shortalt * 0.18)
* Quaternion::rotation_y(shortalt * 0.1)
* Quaternion::rotation_x(0.06);
next.tail_front.scale = Vec3::one();
next.tail_rear.offset = Vec3::new(
@ -143,44 +123,50 @@ impl Animation for RunAnimation {
skeleton_attr.tail_rear.0,
skeleton_attr.tail_rear.1 + centeroffset * 0.6,
);
next.tail_rear.ori = Quaternion::rotation_z(shortalt*0.25)*Quaternion::rotation_y(shortalt*0.1)*Quaternion::rotation_x(-0.04);
next.tail_rear.ori = Quaternion::rotation_z(shortalt * 0.25)
* Quaternion::rotation_y(shortalt * 0.1)
* Quaternion::rotation_x(-0.04);
next.tail_rear.scale = Vec3::one();
next.chest.offset =
Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1)/6.0;
next.chest.ori = Quaternion::rotation_z(short*0.12)*Quaternion::rotation_y(shortalt*0.12);
next.chest.scale = Vec3::one()/6.0;
next.chest.offset = Vec3::new(0.0, skeleton_attr.chest.0, skeleton_attr.chest.1) / 6.0;
next.chest.ori =
Quaternion::rotation_z(short * 0.12) * Quaternion::rotation_y(shortalt * 0.12);
next.chest.scale = Vec3::one() / 6.0;
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1 + foothoril * -2.5,
skeleton_attr.feet_f.1 + foothoril * -1.0,
skeleton_attr.feet_f.2 + ((footvertl * -0.8).max(-0.0)),
);
next.foot_fl.ori = Quaternion::rotation_x(-0.2 + footrotl * -0.4)*Quaternion::rotation_z(footrotl * 0.55);
next.foot_fl.ori =
Quaternion::rotation_x(footrotl * -0.25) * Quaternion::rotation_z(footrotl * 0.35);
next.foot_fl.scale = Vec3::one();
next.foot_fr.offset = Vec3::new(
skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1 + foothorir * -2.5,
skeleton_attr.feet_f.1 + foothorir * -1.0,
skeleton_attr.feet_f.2 + ((footvertr * -0.8).max(-0.0)),
);
next.foot_fr.ori = Quaternion::rotation_x(-0.2 + footrotr * -0.4)*Quaternion::rotation_z(footrotr * -0.55);
next.foot_fr.ori =
Quaternion::rotation_x(footrotr * -0.25) * Quaternion::rotation_z(footrotr * -0.35);
next.foot_fr.scale = Vec3::one();
next.foot_bl.offset = Vec3::new(
-skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1 + foothorilb * -2.5,
skeleton_attr.feet_b.1 + foothorilb * -1.0,
skeleton_attr.feet_b.2 + ((footvertlb * -0.6).max(-0.0)),
);
next.foot_bl.ori = Quaternion::rotation_x(-0.2 + footrotlb * -0.4)*Quaternion::rotation_z(footrotlb * 0.55);
next.foot_bl.ori =
Quaternion::rotation_x(footrotlb * -0.25) * Quaternion::rotation_z(footrotlb * 0.35);
next.foot_bl.scale = Vec3::one();
next.foot_br.offset = Vec3::new(
skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1 + foothorirb * -2.5,
skeleton_attr.feet_b.1 + foothorirb * -1.0,
skeleton_attr.feet_b.2 + ((footvertrb * -0.6).max(-0.0)),
);
next.foot_br.ori = Quaternion::rotation_x(-0.2 + footrotrb * -0.4)*Quaternion::rotation_z(footrotrb * -0.55);
next.foot_br.ori =
Quaternion::rotation_x(footrotrb * -0.25) * Quaternion::rotation_z(footrotrb * -0.35);
next.foot_br.scale = Vec3::one();
next

View File

@ -65,8 +65,7 @@ impl Animation for IdleAnimation {
skeleton_attr.head_lower.0,
skeleton_attr.head_lower.1 + slower * 0.1,
);
next.head_lower.ori =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
next.head_lower.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
next.head_lower.scale = Vec3::one() * 1.02;
next.jaw.offset = Vec3::new(
@ -77,23 +76,17 @@ impl Animation for IdleAnimation {
next.jaw.ori = Quaternion::rotation_x(slow * 0.05);
next.jaw.scale = Vec3::one() * 1.02;
next.tail.offset = Vec3::new(
0.0,
skeleton_attr.tail.0,
skeleton_attr.tail.1 + slower * 0.6,
);
next.tail.ori = Quaternion::rotation_z(0.0 + slow * 0.2 + tailmove.x)
* Quaternion::rotation_x(0.0);
next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1);
next.tail.ori =
Quaternion::rotation_z(0.0 + slow * 0.2 + tailmove.x) * Quaternion::rotation_x(0.0);
next.tail.scale = Vec3::one();
next.torso_front.offset = Vec3::new(
0.0,
skeleton_attr.torso_front.0,
skeleton_attr.torso_front.1 + slower * 0.5,
)/8.0;
next.torso_front.ori = Quaternion::rotation_y(slow * 0.015);
skeleton_attr.torso_front.1 + slower * 0.3,
) / 8.0;
next.torso_front.ori = Quaternion::rotation_y(slow * 0.02);
next.torso_front.scale = Vec3::one() / 8.0;
next.torso_back.offset = Vec3::new(
@ -101,7 +94,7 @@ impl Animation for IdleAnimation {
skeleton_attr.torso_back.0,
skeleton_attr.torso_back.1 + slower * 0.2,
);
next.torso_back.ori = Quaternion::rotation_y(wave_slow_cos * 0.015)
next.torso_back.ori = Quaternion::rotation_y(-slow * 0.005)
* Quaternion::rotation_z(0.0)
* Quaternion::rotation_x(0.0);
next.torso_back.scale = Vec3::one();
@ -113,39 +106,39 @@ impl Animation for IdleAnimation {
next.leg_fl.offset = Vec3::new(
-skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1,
skeleton_attr.leg_f.2 + slower * -0.2,
skeleton_attr.leg_f.2 + slow * -0.15 + slower * -0.15,
);
next.leg_fl.ori = Quaternion::rotation_y(slow * -0.015);
next.leg_fl.ori = Quaternion::rotation_y(slow * -0.02);
next.leg_fl.scale = Vec3::one();
next.leg_fr.offset = Vec3::new(
skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1,
skeleton_attr.leg_f.2 + slower * -0.2,
skeleton_attr.leg_f.2 + slow * 0.15 + slower * -0.15,
);
next.leg_fr.ori = Quaternion::rotation_y(slow * -0.015);
next.leg_fr.ori = Quaternion::rotation_y(slow * -0.02);
next.leg_fr.scale = Vec3::one();
next.leg_bl.offset = Vec3::new(
-skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1,
skeleton_attr.leg_b.2 + slower * -0.2,
skeleton_attr.leg_b.2 + slower * -0.3,
);
next.leg_bl.ori = Quaternion::rotation_y(slow * -0.015+wave_slow_cos * -0.015);
next.leg_bl.ori = Quaternion::rotation_y(slow * -0.02);
next.leg_bl.scale = Vec3::one();
next.leg_br.offset = Vec3::new(
skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1,
skeleton_attr.leg_b.2 + slower * -0.2,
skeleton_attr.leg_b.2 + slower * -0.5,
);
next.leg_br.ori = Quaternion::rotation_y(slow * -0.015+wave_slow_cos * -0.015);
next.leg_br.ori = Quaternion::rotation_y(slow * -0.02);
next.leg_br.scale = Vec3::one();
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2+ slower * -0.2,
skeleton_attr.feet_f.2 + slower * -0.2,
);
next.foot_fl.ori = Quaternion::rotation_x(0.0);
next.foot_fl.scale = Vec3::one();
@ -153,7 +146,7 @@ impl Animation for IdleAnimation {
next.foot_fr.offset = Vec3::new(
skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2+ slower * -0.2,
skeleton_attr.feet_f.2 + slower * -0.2,
);
next.foot_fr.ori = Quaternion::rotation_x(0.0);
next.foot_fr.scale = Vec3::one();
@ -161,7 +154,7 @@ impl Animation for IdleAnimation {
next.foot_bl.offset = Vec3::new(
-skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2+ slower * -0.2,
skeleton_attr.feet_b.2 + slower * -0.2,
);
next.foot_bl.ori = Quaternion::rotation_x(0.0);
next.foot_bl.scale = Vec3::one();
@ -169,7 +162,7 @@ impl Animation for IdleAnimation {
next.foot_br.offset = Vec3::new(
skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2+ slower * -0.2,
skeleton_attr.feet_b.2 + slower * -0.2,
);
next.foot_br.ori = Quaternion::rotation_x(0.0);
next.foot_br.scale = Vec3::one();

View File

@ -51,8 +51,11 @@ impl Animation for JumpAnimation {
* Quaternion::rotation_x(0.2);
next.torso_back.scale = Vec3::one() / 11.0;
next.torso_front.offset =
Vec3::new(0.0, skeleton_attr.torso_front.0, skeleton_attr.torso_front.1) / 11.0;
next.torso_front.offset = Vec3::new(
0.0,
skeleton_attr.torso_front.0,
skeleton_attr.torso_front.1,
) / 11.0;
next.torso_front.ori = Quaternion::rotation_x(-0.4);
next.torso_front.scale = Vec3::one() / 10.98;

View File

@ -46,7 +46,7 @@ impl Skeleton for QuadrupedMediumSkeleton {
let head_upper_mat = self.head_upper.compute_base_matrix();
let head_lower_mat = self.head_lower.compute_base_matrix();
let torso_front_mat = self.torso_front.compute_base_matrix();
let torso_back_mat = self.torso_back.compute_base_matrix();
let torso_back_mat = self.torso_back.compute_base_matrix();
let leg_fl_mat = self.leg_fl.compute_base_matrix();
let leg_fr_mat = self.leg_fr.compute_base_matrix();
let leg_bl_mat = self.leg_bl.compute_base_matrix();
@ -56,19 +56,40 @@ impl Skeleton for QuadrupedMediumSkeleton {
[
FigureBoneData::new(torso_front_mat * head_lower_mat * head_upper_mat),
FigureBoneData::new(torso_front_mat * head_lower_mat),
FigureBoneData::new(torso_front_mat *head_lower_mat * head_upper_mat * self.jaw.compute_base_matrix()),
FigureBoneData::new(torso_front_mat * torso_back_mat * self.tail.compute_base_matrix()),
FigureBoneData::new(
torso_front_mat
* head_lower_mat
* head_upper_mat
* self.jaw.compute_base_matrix(),
),
FigureBoneData::new(
torso_front_mat * torso_back_mat * self.tail.compute_base_matrix(),
),
FigureBoneData::new(torso_front_mat),
FigureBoneData::new(torso_front_mat * torso_back_mat),
FigureBoneData::new(torso_front_mat *head_lower_mat*head_upper_mat * ears_mat),
FigureBoneData::new(torso_front_mat *leg_fl_mat),
FigureBoneData::new(torso_front_mat *leg_fr_mat),
FigureBoneData::new(torso_front_mat *torso_back_mat *leg_bl_mat),
FigureBoneData::new(torso_front_mat *torso_back_mat *leg_br_mat),
FigureBoneData::new(torso_front_mat *leg_fl_mat * self.foot_fl.compute_base_matrix()),
FigureBoneData::new(torso_front_mat *leg_fr_mat * self.foot_fr.compute_base_matrix()),
FigureBoneData::new(torso_front_mat *torso_back_mat *leg_bl_mat * self.foot_bl.compute_base_matrix()),
FigureBoneData::new(torso_front_mat *torso_back_mat *leg_br_mat * self.foot_br.compute_base_matrix()),
FigureBoneData::new(torso_front_mat * head_lower_mat * head_upper_mat * ears_mat),
FigureBoneData::new(torso_front_mat * leg_fl_mat),
FigureBoneData::new(torso_front_mat * leg_fr_mat),
FigureBoneData::new(torso_front_mat * torso_back_mat * leg_bl_mat),
FigureBoneData::new(torso_front_mat * torso_back_mat * leg_br_mat),
FigureBoneData::new(
torso_front_mat * leg_fl_mat * self.foot_fl.compute_base_matrix(),
),
FigureBoneData::new(
torso_front_mat * leg_fr_mat * self.foot_fr.compute_base_matrix(),
),
FigureBoneData::new(
torso_front_mat
* torso_back_mat
* leg_bl_mat
* self.foot_bl.compute_base_matrix(),
),
FigureBoneData::new(
torso_front_mat
* torso_back_mat
* leg_br_mat
* self.foot_br.compute_base_matrix(),
),
FigureBoneData::default(),
],
Vec3::default(),
@ -177,12 +198,12 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
tail: match (body.species, body.body_type) {
(Grolgar, _) => (-11.5, -0.5),
(Saber, _) => (-11.0, 1.0),
(Tuskram, _) => (-10.0, 2.0),
(Tuskram, _) => (-9.0, 2.0),
(Lion, _) => (-11.0, 1.0),
(Tarasque, _) => (-11.0, 0.0),
(Tiger, _) => (-12.5, -7.0),
(Wolf, _) => (-11.0, 0.0),
(Frostfang, _) => (-10.0, -3.5),
(Frostfang, _) => (-7.0, -3.5),
(Mouflon, _) => (-12.0, 1.5),
},
torso_front: match (body.species, body.body_type) {
@ -241,26 +262,26 @@ impl<'a> From<&'a comp::quadruped_medium::Body> for SkeletonAttr {
(Mouflon, _) => (3.5, -5.0, -4.5),
},
feet_f: match (body.species, body.body_type) {
(Grolgar, _) => (0.0, -2.0, -4.0),
(Saber, _) => (1.0, 3.0, -1.0),
(Tuskram, _) => (0.5, 2.0, -5.0),
(Lion, _) => (0.0, 2.0, -4.5),
(Grolgar, _) => (0.0, -3.0, -3.0),
(Saber, _) => (1.0, 0.0, -1.0),
(Tuskram, _) => (0.5, 0.5, -5.0),
(Lion, _) => (0.0, 0.0, -1.5),
(Tarasque, _) => (1.0, 0.0, -3.0),
(Tiger, _) => (1.0, 0.0, -5.0),
(Wolf, _) => (0.5, 0.5, -3.0),
(Frostfang, _) => (0.5, 2.5, -3.5),
(Mouflon, _) => (-0.5, 0.5, -1.5),
(Tiger, _) => (0.5, 0.0, -5.0),
(Wolf, _) => (0.5, 1.5, -3.5),
(Frostfang, _) => (0.5, 1.5, -3.5),
(Mouflon, _) => (-0.5, -0.5, -1.5),
},
feet_b: match (body.species, body.body_type) {
(Grolgar, _) => (0.0, 0.0, -5.0),
(Saber, _) => (1.0, 0.0, 0.0),
(Saber, _) => (1.0, -2.0, 0.0),
(Tuskram, _) => (0.5, 0.0, -4.0),
(Lion, _) => (0.5, 0.5, -4.0),
(Tarasque, _) => (1.5, -1.0, -2.5),
(Tiger, _) => (1.0, 0.5, -4.0),
(Wolf, _) => (0.0, -0.5, -2.5),
(Frostfang, _) => (0.0, -0.5, -3.5),
(Mouflon, _) => (-1.0, -0.5, -2.5),
(Wolf, _) => (0.0, -1.5, -3.0),
(Frostfang, _) => (0.0, -1.5, -3.5),
(Mouflon, _) => (-1.0, -1.5, -2.5),
},
}
}

View File

@ -24,334 +24,298 @@ impl Animation for RunAnimation {
*rate = 1.0;
let lab = 0.6;
let speedmult = if speed > 8.0 { 1.0 } else { 0.8 };
let short = (((1.0)
/ (0.72
+ 0.28 * ((anim_time as f32 *16.0* lab as f32+ PI * 1.0).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 *16.0* lab as f32+ PI * 1.0).sin());
let foothoril = (((1.0)
/ (0.2
+ (0.8)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.45).sin())
+ 0.28
* ((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 + PI * 1.45).sin());
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.0).sin());
let foothoril = (((1.0)
/ (0.5
+ (0.5)
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.45).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.45).sin());
let foothorir = (((1.0)
/ (0.2
+ (0.8)
* ((anim_time as f32 * 16.0 * lab as f32 + PI *0.45).sin())
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.45).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.45).sin());
let footvertl = (anim_time as f32 * 16.0 * lab as f32+PI*0.0).sin();
let footvertr = (anim_time as f32 * 16.0 * lab as f32 + PI).sin();
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.45).sin());
let footvertl = (anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.0).sin();
let footvertr = (anim_time as f32 * 16.0 * lab as f32 * speedmult + PI).sin();
let footrotl = (((1.0)
/ (0.5
+ (0.5)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin())
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.4).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.4).sin());
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.4).sin());
let footrotr = (((1.0)
/ (0.5
+ (0.5)
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.4).sin())
* ((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 + PI * 0.4).sin());
//
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.4).sin());
//
let foothorilb = (((5.0)
/ (1.0
+ (4.0)
* ((anim_time as f32 * 16.0 * lab as f32 + PI *1.05).sin())
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.05).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 1.05).sin());
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 1.05).sin());
let foothorirb = (((1.0)
/ (0.2
+ (0.8)
* ((anim_time as f32 * 16.0 * lab as f32 + PI *0.05).sin())
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.05).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.05).sin());
let footvertlb = (anim_time as f32 * 16.0 * lab as f32+PI*(-0.4)).sin();
let footvertrb = (anim_time as f32 * 16.0 * lab as f32 + PI*0.6).sin();
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.05).sin());
let footvertlb = (anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * (-0.4)).sin();
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 + PI * 1.0).sin())
* ((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 + PI * 1.0).sin());
* ((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 + PI * 0.0).sin())
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.0).sin())
.powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * 16.0 * lab as f32 + PI * 0.0).sin());
* ((anim_time as f32 * 16.0 * lab as f32 * speedmult + PI * 0.0).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)
.sin()
.max(0.2);
let horichest = (anim_time as f32 * lab as f32 * speedmult + PI * 0.8).sin();
if speed < 8.0 {
//Trot
next.head_upper.offset =
Vec3::new(0.0, skeleton_attr.head_upper.0, skeleton_attr.head_upper.1);
next.head_upper.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_z(0.0);
next.head_upper.scale = Vec3::one();
next.head_lower.offset = Vec3::new(
0.0,
skeleton_attr.head_lower.0 + horichest * 0.8,
skeleton_attr.head_lower.1 + vertchest * -0.8,
);
next.head_lower.ori = Quaternion::rotation_z(0.0);
next.head_lower.scale = Vec3::one() * 1.02;
next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
next.jaw.ori = Quaternion::rotation_x(0.0);
next.jaw.scale = Vec3::one() * 1.02;
let shortalt = (anim_time as f32 *16.0* lab as f32 + PI * 0.5).sin();
next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1);
next.tail.ori = Quaternion::rotation_x(shortalt * 0.08);
next.tail.scale = Vec3::one();
next.torso_front.offset = Vec3::new(
0.0,
skeleton_attr.torso_front.0,
skeleton_attr.torso_front.1 + shortalt * 0.8,
) / 8.0;
next.torso_front.ori = Quaternion::rotation_x(short * 0.03);
next.torso_front.scale = Vec3::one() / 8.0;
next.torso_back.offset =
Vec3::new(0.0, skeleton_attr.torso_back.0, skeleton_attr.torso_back.1);
next.torso_back.ori = Quaternion::rotation_x(short * -0.03);
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.scale = Vec3::one() * 1.02;
////left and right functions currently swapped on some bones to change gait
next.leg_fl.offset = Vec3::new(
-skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1 + foothoril * -1.0,
skeleton_attr.leg_f.2 + footvertl * -0.4,
);
next.leg_fl.ori = Quaternion::rotation_x(footrotl * -0.3);
next.leg_fl.scale = Vec3::one() * 0.99;
next.leg_fr.offset = Vec3::new(
skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1 + foothorir * -1.0,
skeleton_attr.leg_f.2 + footvertr * -0.4,
);
next.leg_fr.ori = Quaternion::rotation_x(footrotr * -0.3);
next.leg_fr.scale = Vec3::one() * 0.99;
next.leg_bl.offset = Vec3::new(
-skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1 + foothorilb * -1.0,
skeleton_attr.leg_b.2 + footvertlb * -0.4,
);
next.leg_bl.ori = Quaternion::rotation_x(footrotlb * -0.3);
next.leg_bl.scale = Vec3::one() * 0.99;
next.leg_br.offset = Vec3::new(
skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1 + foothorirb * -1.0,
skeleton_attr.leg_b.2 + footvertrb * -0.4,
);
next.leg_br.ori = Quaternion::rotation_x(footrotrb * -0.3);
next.leg_br.scale = Vec3::one() * 0.99;
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2 + 1.0 + ((footvertl * -1.0).max(-1.0)),
);
next.foot_fl.ori = Quaternion::rotation_x(footrotl * -0.3);
next.foot_fl.scale = Vec3::one() * 0.97;
let vertchest = (anim_time as f32 * lab as f32 + PI * 0.3).sin().max(0.2);
let horichest = (anim_time as f32 * lab as f32 + PI * 0.8).sin();
next.foot_fr.offset = Vec3::new(
skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2 + 1.0 + ((footvertr * -1.0).max(-1.0)),
);
next.foot_fr.ori = Quaternion::rotation_x(footrotr * -0.3);
next.foot_fr.scale = Vec3::one() * 0.98;
if speed < 8.0{//Trot
next.head_upper.offset = Vec3::new(
0.0,
skeleton_attr.head_upper.0,
skeleton_attr.head_upper.1,
);
next.head_upper.ori =
Quaternion::rotation_x(0.0) * Quaternion::rotation_z(0.0);
next.head_upper.scale = Vec3::one();
next.foot_bl.offset = Vec3::new(
-skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2 + 1.0 + ((footvertlb * -1.0).max(-1.0)),
);
next.foot_bl.ori = Quaternion::rotation_x(footrotlb * -0.3);
next.foot_bl.scale = Vec3::one() * 0.98;
next.head_lower.offset = Vec3::new(
0.0,
skeleton_attr.head_lower.0 + horichest * 0.8,
skeleton_attr.head_lower.1 + vertchest * -0.8,
);
next.head_lower.ori = Quaternion::rotation_z(0.0);
next.head_lower.scale = Vec3::one() * 1.02;
next.foot_br.offset = Vec3::new(
skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2 + 1.0 + ((footvertrb * -1.0).max(-1.0)),
);
next.foot_br.ori = Quaternion::rotation_x(footrotrb * -0.3);
next.foot_br.scale = Vec3::one() * 0.98;
} else {
//Gallop
next.head_upper.offset =
Vec3::new(0.0, skeleton_attr.head_upper.0, skeleton_attr.head_upper.1);
next.head_upper.ori = Quaternion::rotation_x(0.0) * Quaternion::rotation_z(0.0);
next.head_upper.scale = Vec3::one();
next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
next.jaw.ori = Quaternion::rotation_x(0.0);
next.jaw.scale = Vec3::one() * 1.02;
next.head_lower.offset = Vec3::new(
0.0,
skeleton_attr.head_lower.0 + horichest * 0.8,
skeleton_attr.head_lower.1 + vertchest * -0.8,
);
next.head_lower.ori = Quaternion::rotation_z(0.0);
next.head_lower.scale = Vec3::one() * 1.02;
next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1);
next.tail.ori = Quaternion::rotation_x(shortalt*0.08);
next.tail.scale = Vec3::one();
next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
next.jaw.ori = Quaternion::rotation_x(0.0);
next.jaw.scale = Vec3::one() * 1.02;
next.torso_front.offset = Vec3::new(
0.0,
skeleton_attr.torso_front.0,
skeleton_attr.torso_front.1+shortalt*0.8,
) / 8.0;
next.torso_front.ori = Quaternion::rotation_x(short * 0.06);
next.torso_front.scale = Vec3::one() / 8.0;
next.torso_back.offset = Vec3::new(
0.0,
skeleton_attr.torso_back.0,
skeleton_attr.torso_back.1,
);
next.torso_back.ori = Quaternion::rotation_x(short * -0.05);
next.torso_back.scale = Vec3::one();
next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1);
next.tail.ori = Quaternion::rotation_x(shortalt * 0.3);
next.tail.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.scale = Vec3::one() * 1.02;
next.torso_front.offset = Vec3::new(
0.0,
skeleton_attr.torso_front.0,
skeleton_attr.torso_front.1 + shortalt * 2.0,
) / 8.0;
next.torso_front.ori = Quaternion::rotation_x(short * 0.13);
next.torso_front.scale = Vec3::one() / 8.0;
next.torso_back.offset =
Vec3::new(0.0, skeleton_attr.torso_back.0, skeleton_attr.torso_back.1);
next.torso_back.ori = Quaternion::rotation_x(short * 0.1);
next.torso_back.scale = Vec3::one();
////left and right functions currently swapped on some bones to change gait
next.leg_fl.offset = Vec3::new(
-skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1 + foothoril * -1.0,
skeleton_attr.leg_f.2 +1.0+ footvertl * -0.06,
);
next.leg_fl.ori = Quaternion::rotation_x(footrotl * -0.09);
next.leg_fl.scale = Vec3::one()*0.99;
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.scale = Vec3::one() * 1.02;
////left and right functions currently swapped on some bones to change gait
next.leg_fl.offset = Vec3::new(
-skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1 + foothoril * -2.5,
skeleton_attr.leg_f.2 + 1.0 + footvertl * -1.0,
);
next.leg_fl.ori = Quaternion::rotation_x(footrotl * -0.6);
next.leg_fl.scale = Vec3::one() * 0.99;
next.leg_fr.offset = Vec3::new(
skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1 + foothorir * -1.0,
skeleton_attr.leg_f.2 +1.0+ footvertr * -0.6,
);
next.leg_fr.ori = Quaternion::rotation_x(footrotr * -0.09);
next.leg_fr.scale = Vec3::one()*0.99;
next.leg_fr.offset = Vec3::new(
skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1 + foothoril * -2.5,
skeleton_attr.leg_f.2 + 1.0 + footvertl * -1.0,
);
next.leg_fr.ori = Quaternion::rotation_x(footrotl * -0.6);
next.leg_fr.scale = Vec3::one() * 0.99;
next.leg_bl.offset = Vec3::new(
-skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1 + foothorilb * -1.0,
skeleton_attr.leg_b.2 +1.0+ footvertlb * -0.8,
next.leg_bl.offset = Vec3::new(
-skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1 + foothorirb * -2.5,
skeleton_attr.leg_b.2 + 1.0 + footvertrb * -1.2,
);
next.leg_bl.ori = Quaternion::rotation_x(footrotrb * -0.6);
next.leg_bl.scale = Vec3::one() * 0.99;
);
next.leg_bl.ori = Quaternion::rotation_x(footrotlb * -0.09);
next.leg_bl.scale = Vec3::one() *0.99;
next.leg_br.offset = Vec3::new(
skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1 + foothorirb * -2.5,
skeleton_attr.leg_b.2 + 1.0 + footvertrb * -1.2,
);
next.leg_br.ori = Quaternion::rotation_x(footrotrb * -0.6);
next.leg_br.scale = Vec3::one() * 0.99;
next.leg_br.offset = Vec3::new(
skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1 + foothorirb * -1.0,
skeleton_attr.leg_b.2 +1.0+ footvertrb * -0.8,
);
next.leg_br.ori = Quaternion::rotation_x(footrotrb * -0.09);
next.leg_br.scale = Vec3::one() *0.99;
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2 + 2.0 + ((footvertl * -2.0).max(-1.0)),
);
next.foot_fl.ori = Quaternion::rotation_x(footrotl * -0.7);
next.foot_fl.scale = Vec3::one() * 0.97;
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2+ ((footvertl * -1.5).max(-1.0)),
);
next.foot_fl.ori = Quaternion::rotation_x(footrotl * -0.6);
next.foot_fl.scale = Vec3::one()*0.97;
next.foot_fr.offset = Vec3::new(
skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2+ ((footvertr * -1.5).max(-1.0)),
);
next.foot_fr.ori = Quaternion::rotation_x(footrotr * -0.6);
next.foot_fr.scale = Vec3::one()*0.98;
next.foot_bl.offset = Vec3::new(
-skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2+ ((footvertlb * -1.5).max(-1.0)),
);
next.foot_bl.ori = Quaternion::rotation_x(footrotlb * -0.6);
next.foot_bl.scale = Vec3::one()*0.98;
next.foot_br.offset = Vec3::new(
skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2 + ((footvertrb * -1.5).max(-1.0)),
);
next.foot_br.ori = Quaternion::rotation_x(footrotrb * -0.6);
next.foot_br.scale = Vec3::one()*0.98;
}
else {//Gallop
next.head_upper.offset = Vec3::new(
0.0,
skeleton_attr.head_upper.0,
skeleton_attr.head_upper.1,
);
next.head_upper.ori =
Quaternion::rotation_x(0.0) * Quaternion::rotation_z(0.0);
next.head_upper.scale = Vec3::one();
next.head_lower.offset = Vec3::new(
0.0,
skeleton_attr.head_lower.0 + horichest * 0.8,
skeleton_attr.head_lower.1 + vertchest * -0.8,
);
next.head_lower.ori = Quaternion::rotation_z(0.0);
next.head_lower.scale = Vec3::one() * 1.02;
next.jaw.offset = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1);
next.jaw.ori = Quaternion::rotation_x(0.0);
next.jaw.scale = Vec3::one() * 1.02;
next.tail.offset = Vec3::new(0.0, skeleton_attr.tail.0, skeleton_attr.tail.1);
next.tail.ori = Quaternion::rotation_x(shortalt*0.3);
next.tail.scale = Vec3::one();
next.torso_front.offset = Vec3::new(
0.0,
skeleton_attr.torso_front.0,
skeleton_attr.torso_front.1+shortalt*2.0,
) / 8.0;
next.torso_front.ori = Quaternion::rotation_x(short * 0.17);
next.torso_front.scale = Vec3::one() / 8.0;
next.torso_back.offset = Vec3::new(
0.0,
skeleton_attr.torso_back.0,
skeleton_attr.torso_back.1,
);
next.torso_back.ori = Quaternion::rotation_x(short * -0.1);
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.scale = Vec3::one() * 1.02;
////left and right functions currently swapped on some bones to change gait
next.leg_fl.offset = Vec3::new(
-skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1 + foothoril * -2.5,
skeleton_attr.leg_f.2 +1.0+ footvertl * -1.0,
);
next.leg_fl.ori = Quaternion::rotation_x(footrotl * -0.6);
next.leg_fl.scale = Vec3::one()*0.99;
next.leg_fr.offset = Vec3::new(
skeleton_attr.leg_f.0,
skeleton_attr.leg_f.1 + foothoril * -2.5,
skeleton_attr.leg_f.2 +1.0+ footvertl * -1.0,
);
next.leg_fr.ori = Quaternion::rotation_x(footrotl * -0.6);
next.leg_fr.scale = Vec3::one()*0.99;
next.leg_bl.offset = Vec3::new(
-skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1 + foothorirb * -2.5,
skeleton_attr.leg_b.2 +1.0+ footvertrb * -1.2,
);
next.leg_bl.ori = Quaternion::rotation_x(footrotrb * -0.6);
next.leg_bl.scale = Vec3::one() *0.99;
next.leg_br.offset = Vec3::new(
skeleton_attr.leg_b.0,
skeleton_attr.leg_b.1 + foothorirb * -2.5,
skeleton_attr.leg_b.2 +1.0+ footvertrb * -1.2,
);
next.leg_br.ori = Quaternion::rotation_x(footrotrb * -0.6);
next.leg_br.scale = Vec3::one() *0.99;
next.foot_fl.offset = Vec3::new(
-skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2+ ((footvertl * -3.5).max(-1.0)),
);
next.foot_fl.ori = Quaternion::rotation_x(footrotl * -0.7);
next.foot_fl.scale = Vec3::one()*0.97;
next.foot_fr.offset = Vec3::new(
skeleton_attr.feet_f.0,
skeleton_attr.feet_f.1,
skeleton_attr.feet_f.2+ ((footvertl * -3.5).max(-1.0)),
);
next.foot_fr.ori = Quaternion::rotation_x(footrotl * -0.7);
next.foot_fr.scale = Vec3::one()*0.98;
next.foot_bl.offset = Vec3::new(
-skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2+ ((footvertrb * -3.5).max(-1.0)),
);
next.foot_bl.ori = Quaternion::rotation_x(footrotrb * -0.7);
next.foot_bl.scale = Vec3::one()*0.98;
next.foot_br.offset = Vec3::new(
skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2 + ((footvertrb * -3.5).max(-1.0)),
);
next.foot_br.ori = Quaternion::rotation_x(footrotrb * -0.7);
next.foot_br.scale = Vec3::one()*0.98;
next.foot_fr.offset = Vec3::new(
skeleton_attr.feet_f.0,
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.scale = Vec3::one() * 0.98;
next.foot_bl.offset = Vec3::new(
-skeleton_attr.feet_b.0,
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.scale = Vec3::one() * 0.98;
next.foot_br.offset = Vec3::new(
skeleton_attr.feet_b.0,
skeleton_attr.feet_b.1,
skeleton_attr.feet_b.2 + 2.0 + ((footvertrb * -2.0).max(-1.0)),
);
next.foot_br.ori = Quaternion::rotation_x(footrotrb * -0.7);
next.foot_br.scale = Vec3::one() * 0.98;
}
next
}
}

View File

@ -16,9 +16,9 @@ use common::{
ItemKind, Lantern, LanternKind,
},
object,
quadruped_low::{BodyType as QLBodyType, Species as QLSpecies},
quadruped_medium::{BodyType as QMBodyType, Species as QMSpecies},
quadruped_small::{BodyType as QSBodyType, Species as QSSpecies},
quadruped_low::{BodyType as QLBodyType, Species as QLSpecies},
Loadout,
},
figure::{DynaUnionizer, MatSegment, Material, Segment},
@ -3316,7 +3316,7 @@ impl QuadrupedLowLateralSpec {
}
}
///
///
pub fn mesh_object(
obj: object::Body,

View File

@ -16,8 +16,9 @@ use anim::{
biped_large::BipedLargeSkeleton, bird_medium::BirdMediumSkeleton,
bird_small::BirdSmallSkeleton, character::CharacterSkeleton, critter::CritterSkeleton,
dragon::DragonSkeleton, fish_medium::FishMediumSkeleton, fish_small::FishSmallSkeleton,
golem::GolemSkeleton, object::ObjectSkeleton, quadruped_medium::QuadrupedMediumSkeleton,
quadruped_small::QuadrupedSmallSkeleton, quadruped_low::QuadrupedLowSkeleton, Animation, Skeleton,
golem::GolemSkeleton, object::ObjectSkeleton, quadruped_low::QuadrupedLowSkeleton,
quadruped_medium::QuadrupedMediumSkeleton, quadruped_small::QuadrupedSmallSkeleton, Animation,
Skeleton,
};
use common::{
comp::{
@ -1028,9 +1029,7 @@ impl FigureMgr {
let state = self
.quadruped_low_states
.entry(entity)
.or_insert_with(|| {
FigureState::new(renderer, QuadrupedLowSkeleton::new())
});
.or_insert_with(|| FigureState::new(renderer, QuadrupedLowSkeleton::new()));
let (character, last_character) = match (character, last_character) {
(Some(c), Some(l)) => (c, l),
@ -1057,25 +1056,21 @@ impl FigureMgr {
)
},
// Running
(true, true, false) => {
anim::quadruped_low::RunAnimation::update_skeleton(
&QuadrupedLowSkeleton::new(),
(vel.0.magnitude(), time),
state.state_time,
&mut state_animation_rate,
skeleton_attr,
)
},
(true, true, false) => anim::quadruped_low::RunAnimation::update_skeleton(
&QuadrupedLowSkeleton::new(),
(vel.0.magnitude(), time),
state.state_time,
&mut state_animation_rate,
skeleton_attr,
),
// In air
(false, _, false) => {
anim::quadruped_low::JumpAnimation::update_skeleton(
&QuadrupedLowSkeleton::new(),
(vel.0.magnitude(), time),
state.state_time,
&mut state_animation_rate,
skeleton_attr,
)
},
(false, _, false) => anim::quadruped_low::JumpAnimation::update_skeleton(
&QuadrupedLowSkeleton::new(),
(vel.0.magnitude(), time),
state.state_time,
&mut state_animation_rate,
skeleton_attr,
),
// TODO!
_ => state.skeleton_mut().clone(),
@ -2175,7 +2170,7 @@ impl FigureMgr {
.iter()
.filter(|(_, c)| c.visible)
.count()
+ self
+ self
.quadruped_low_states
.iter()
.filter(|(_, c)| c.visible)