From 3eeaf7e8c96fe7ec74e22122f9e4d2d6c3e2b442 Mon Sep 17 00:00:00 2001 From: jshipsey Date: Sat, 29 Aug 2020 19:46:05 -0400 Subject: [PATCH] idle for theropod, corrections to swimming --- voxygen/src/anim/src/quadruped_medium/run.rs | 6 +- voxygen/src/anim/src/theropod/idle.rs | 50 +++++----- voxygen/src/anim/src/theropod/jump.rs | 53 +++++------ voxygen/src/anim/src/theropod/mod.rs | 24 ++--- voxygen/src/anim/src/theropod/run.rs | 96 ++++++++++++++------ voxygen/src/scene/figure/mod.rs | 40 +++++++- 6 files changed, 173 insertions(+), 96 deletions(-) diff --git a/voxygen/src/anim/src/quadruped_medium/run.rs b/voxygen/src/anim/src/quadruped_medium/run.rs index 23af24cfd3..8fa866c4d3 100644 --- a/voxygen/src/anim/src/quadruped_medium/run.rs +++ b/voxygen/src/anim/src/quadruped_medium/run.rs @@ -25,7 +25,7 @@ impl Animation for RunAnimation { let speed = Vec2::::from(velocity).magnitude(); *rate = 1.0; //let increasefreqtest = (((1.0/speed)*3.0).round()).min(5.0); - let lab = 0.1; //6 + let lab = 0.6; //6 let amplitude = (speed / 24.0).max(0.25); let amplitude2 = (speed * 1.4 / 24.0).max(0.6); let amplitude3 = (speed / 24.0).max(0.35); @@ -106,8 +106,8 @@ impl Animation for RunAnimation { next.head_upper.position = Vec3::new(0.0, skeleton_attr.head_upper.0, skeleton_attr.head_upper.1); next.head_upper.orientation = - Quaternion::rotation_x(look.y * 0.1 / canceler + amplitude * short * -0.03 - 0.1) - * Quaternion::rotation_z(look.x * 0.1 / canceler + tilt * -1.2) + Quaternion::rotation_x(look.y*0.3 / ((canceler).max(0.5)) + amplitude * short * -0.03 - 0.1) + * Quaternion::rotation_z(look.x*0.3 / ((canceler).max(0.5)) + tilt * -1.2) * Quaternion::rotation_y(tilt * 0.8); next.head_upper.scale = Vec3::one(); diff --git a/voxygen/src/anim/src/theropod/idle.rs b/voxygen/src/anim/src/theropod/idle.rs index 7fc5ea3121..b6c35f5d0c 100644 --- a/voxygen/src/anim/src/theropod/idle.rs +++ b/voxygen/src/anim/src/theropod/idle.rs @@ -22,39 +22,43 @@ impl Animation for IdleAnimation { ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1); - next.head.orientation = Quaternion::rotation_z(0.0); - next.head.scale = Vec3::one(); + + let breathe = (anim_time as f32 * 0.8).sin(); + + + next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1+breathe * 0.3); + next.head.orientation = Quaternion::rotation_x(breathe * 0.1-0.1); + next.head.scale = Vec3::one()*1.02; next.jaw.position = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1); - next.jaw.orientation = Quaternion::rotation_z(0.0); - next.jaw.scale = Vec3::one(); + next.jaw.orientation = Quaternion::rotation_x(breathe * 0.05); + next.jaw.scale = Vec3::one()*0.98; - next.neck.position = Vec3::new(0.0, skeleton_attr.neck.0, skeleton_attr.neck.1); - next.neck.orientation = Quaternion::rotation_z(0.0); - next.neck.scale = Vec3::one(); + next.neck.position = Vec3::new(0.0, skeleton_attr.neck.0, skeleton_attr.neck.1+breathe * 0.2); + next.neck.orientation = Quaternion::rotation_x(-0.1); + next.neck.scale = Vec3::one()*0.98; next.chest_front.position = Vec3::new( 0.0, skeleton_attr.chest_front.0, - skeleton_attr.chest_front.1, - ); - next.chest_front.orientation = Quaternion::rotation_z(0.0); - next.chest_front.scale = Vec3::one(); + skeleton_attr.chest_front.1+breathe * 0.3, + )/3.0; + next.chest_front.orientation = Quaternion::rotation_x(breathe * 0.04); + next.chest_front.scale = Vec3::one()/3.0; next.chest_back.position = Vec3::new(0.0, skeleton_attr.chest_back.0, skeleton_attr.chest_back.1); - next.chest_back.orientation = Quaternion::rotation_z(0.0); + next.chest_back.orientation = Quaternion::rotation_x(breathe * -0.04); next.chest_back.scale = Vec3::one(); next.tail_front.position = Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1); - next.tail_front.orientation = Quaternion::rotation_z(0.0); + next.tail_front.orientation = Quaternion::rotation_x(0.1); next.tail_front.scale = Vec3::one(); next.tail_back.position = Vec3::new(0.0, skeleton_attr.tail_back.0, skeleton_attr.tail_back.1); - next.tail_back.orientation = Quaternion::rotation_z(0.0); + next.tail_back.orientation = Quaternion::rotation_x(0.1); next.tail_back.scale = Vec3::one(); next.hand_l.position = Vec3::new( @@ -62,7 +66,7 @@ impl Animation for IdleAnimation { skeleton_attr.hand.1, skeleton_attr.hand.2, ); - next.hand_l.orientation = Quaternion::rotation_z(0.0); + next.hand_l.orientation = Quaternion::rotation_x(breathe * 0.2); next.hand_l.scale = Vec3::one(); next.hand_r.position = Vec3::new( @@ -70,13 +74,13 @@ impl Animation for IdleAnimation { skeleton_attr.hand.1, skeleton_attr.hand.2, ); - next.hand_r.orientation = Quaternion::rotation_z(0.0); + next.hand_r.orientation = Quaternion::rotation_x(breathe * 0.2); next.hand_r.scale = Vec3::one(); next.leg_l.position = Vec3::new( -skeleton_attr.leg.0, skeleton_attr.leg.1, - skeleton_attr.leg.2, + skeleton_attr.leg.2+breathe * 0.05, ); next.leg_l.orientation = Quaternion::rotation_z(0.0); next.leg_l.scale = Vec3::one(); @@ -84,7 +88,7 @@ impl Animation for IdleAnimation { next.leg_r.position = Vec3::new( skeleton_attr.leg.0, skeleton_attr.leg.1, - skeleton_attr.leg.2, + skeleton_attr.leg.2+breathe * 0.05, ); next.leg_r.orientation = Quaternion::rotation_z(0.0); next.leg_r.scale = Vec3::one(); @@ -92,18 +96,18 @@ impl Animation for IdleAnimation { next.foot_l.position = Vec3::new( -skeleton_attr.foot.0, skeleton_attr.foot.1, - skeleton_attr.foot.2, + skeleton_attr.foot.2+breathe * -0.35, ); next.foot_l.orientation = Quaternion::rotation_z(0.0); - next.foot_l.scale = Vec3::one(); + next.foot_l.scale = Vec3::one()*1.02; next.foot_r.position = Vec3::new( skeleton_attr.foot.0, skeleton_attr.foot.1, - skeleton_attr.foot.2, + skeleton_attr.foot.2+breathe * -0.45, ); next.foot_r.orientation = Quaternion::rotation_z(0.0); - next.foot_r.scale = Vec3::one(); + next.foot_r.scale = Vec3::one()*1.02; next } diff --git a/voxygen/src/anim/src/theropod/jump.rs b/voxygen/src/anim/src/theropod/jump.rs index fe6be33a0b..23c2a5f958 100644 --- a/voxygen/src/anim/src/theropod/jump.rs +++ b/voxygen/src/anim/src/theropod/jump.rs @@ -15,47 +15,48 @@ impl Animation for JumpAnimation { fn update_skeleton_inner( skeleton: &Self::Skeleton, _global_time: Self::Dependency, - _anim_time: f64, + anim_time: f64, _rate: &mut f32, skeleton_attr: &SkeletonAttr, ) -> Self::Skeleton { let mut next = (*skeleton).clone(); - let wave = (_anim_time as f32 * 1.0).sin(); + let breathe = (anim_time as f32 * 0.8).sin(); - next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1); - next.head.orientation = Quaternion::rotation_z(0.0); - next.head.scale = Vec3::one(); + + next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1+breathe * 0.3); + next.head.orientation = Quaternion::rotation_x(breathe * 0.1-0.1); + next.head.scale = Vec3::one()*1.02; next.jaw.position = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1); - next.jaw.orientation = Quaternion::rotation_z(0.0); - next.jaw.scale = Vec3::one(); + next.jaw.orientation = Quaternion::rotation_x(breathe * 0.05); + next.jaw.scale = Vec3::one()*0.98; - next.neck.position = Vec3::new(0.0, skeleton_attr.neck.0, skeleton_attr.neck.1); - next.neck.orientation = Quaternion::rotation_z(0.0); - next.neck.scale = Vec3::one(); + next.neck.position = Vec3::new(0.0, skeleton_attr.neck.0, skeleton_attr.neck.1+breathe * 0.2); + next.neck.orientation = Quaternion::rotation_x(-0.1); + next.neck.scale = Vec3::one()*0.98; next.chest_front.position = Vec3::new( 0.0, skeleton_attr.chest_front.0, - skeleton_attr.chest_front.1, - ); - next.chest_front.orientation = Quaternion::rotation_z(0.0); - next.chest_front.scale = Vec3::one(); + skeleton_attr.chest_front.1+breathe * 0.3, + )/3.0; + next.chest_front.orientation = Quaternion::rotation_x(breathe * 0.04); + next.chest_front.scale = Vec3::one()/3.0; next.chest_back.position = Vec3::new(0.0, skeleton_attr.chest_back.0, skeleton_attr.chest_back.1); - next.chest_back.orientation = Quaternion::rotation_z(0.0); + next.chest_back.orientation = Quaternion::rotation_x(breathe * -0.04); next.chest_back.scale = Vec3::one(); next.tail_front.position = Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1); - next.tail_front.orientation = Quaternion::rotation_z(0.0); + next.tail_front.orientation = Quaternion::rotation_x(0.1); next.tail_front.scale = Vec3::one(); next.tail_back.position = Vec3::new(0.0, skeleton_attr.tail_back.0, skeleton_attr.tail_back.1); - next.tail_back.orientation = Quaternion::rotation_z(0.0); + next.tail_back.orientation = Quaternion::rotation_x(0.1); next.tail_back.scale = Vec3::one(); next.hand_l.position = Vec3::new( @@ -63,7 +64,7 @@ impl Animation for JumpAnimation { skeleton_attr.hand.1, skeleton_attr.hand.2, ); - next.hand_l.orientation = Quaternion::rotation_z(0.0); + next.hand_l.orientation = Quaternion::rotation_x(breathe * 0.2); next.hand_l.scale = Vec3::one(); next.hand_r.position = Vec3::new( @@ -71,13 +72,13 @@ impl Animation for JumpAnimation { skeleton_attr.hand.1, skeleton_attr.hand.2, ); - next.hand_r.orientation = Quaternion::rotation_z(0.0); - next.hand_l.scale = Vec3::one(); + next.hand_r.orientation = Quaternion::rotation_x(breathe * 0.2); + next.hand_r.scale = Vec3::one(); next.leg_l.position = Vec3::new( -skeleton_attr.leg.0, skeleton_attr.leg.1, - skeleton_attr.leg.2, + skeleton_attr.leg.2+breathe * 0.05, ); next.leg_l.orientation = Quaternion::rotation_z(0.0); next.leg_l.scale = Vec3::one(); @@ -85,7 +86,7 @@ impl Animation for JumpAnimation { next.leg_r.position = Vec3::new( skeleton_attr.leg.0, skeleton_attr.leg.1, - skeleton_attr.leg.2, + skeleton_attr.leg.2+breathe * 0.05, ); next.leg_r.orientation = Quaternion::rotation_z(0.0); next.leg_r.scale = Vec3::one(); @@ -93,18 +94,18 @@ impl Animation for JumpAnimation { next.foot_l.position = Vec3::new( -skeleton_attr.foot.0, skeleton_attr.foot.1, - skeleton_attr.foot.2, + skeleton_attr.foot.2+breathe * -0.35, ); next.foot_l.orientation = Quaternion::rotation_z(0.0); - next.foot_l.scale = Vec3::one(); + next.foot_l.scale = Vec3::one()*1.02; next.foot_r.position = Vec3::new( skeleton_attr.foot.0, skeleton_attr.foot.1, - skeleton_attr.foot.2, + skeleton_attr.foot.2+breathe * -0.45, ); next.foot_r.orientation = Quaternion::rotation_z(0.0); - next.foot_r.scale = Vec3::one(); + next.foot_r.scale = Vec3::one()*1.02; next } diff --git a/voxygen/src/anim/src/theropod/mod.rs b/voxygen/src/anim/src/theropod/mod.rs index 86b08cfb5a..d14642c740 100644 --- a/voxygen/src/anim/src/theropod/mod.rs +++ b/voxygen/src/anim/src/theropod/mod.rs @@ -47,8 +47,8 @@ impl Skeleton for TheropodSkeleton { let head_mat = neck_mat * Mat4::::from(self.head); let chest_back_mat = chest_front_mat * Mat4::::from(self.chest_back); let tail_front_mat = chest_back_mat * Mat4::::from(self.tail_front); - let leg_l_mat = chest_front_mat * Mat4::::from(self.leg_l); - let leg_r_mat = chest_front_mat * Mat4::::from(self.leg_r); + let leg_l_mat = chest_back_mat * Mat4::::from(self.leg_l); + let leg_r_mat = chest_back_mat * Mat4::::from(self.leg_r); *(<&mut [_; Self::BONE_COUNT]>::try_from(&mut buf[0..Self::BONE_COUNT]).unwrap()) = [ make_bone(head_mat), @@ -119,16 +119,16 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Odontotyrannos, _) => (-2.5, 3.0), }, jaw: match (body.species, body.body_type) { - (Archaeos, _) => (10.0, -7.0), - (Odontotyrannos, _) => (10.0, -7.0), + (Archaeos, _) => (1.0, -7.0), + (Odontotyrannos, _) => (1.0, -7.0), }, neck: match (body.species, body.body_type) { (Archaeos, _) => (4.5, -2.0), (Odontotyrannos, _) => (4.5, -2.0), }, chest_front: match (body.species, body.body_type) { - (Archaeos, _) => (4.5, 20.0), - (Odontotyrannos, _) => (4.0, 13.0), + (Archaeos, _) => (0.0, 20.0), + (Odontotyrannos, _) => (0.0, 9.0), }, chest_back: match (body.species, body.body_type) { (Archaeos, _) => (-5.5, -1.0), @@ -139,19 +139,19 @@ impl<'a> From<&'a Body> for SkeletonAttr { (Odontotyrannos, _) => (-8.0, -1.0), }, tail_back: match (body.species, body.body_type) { - (Archaeos, _) => (-20.0, -0.5), - (Odontotyrannos, _) => (-19.0, -1.5), + (Archaeos, _) => (-8.0, -0.5), + (Odontotyrannos, _) => (-12.0, -1.5), }, hand: match (body.species, body.body_type) { - (Archaeos, _) => (2.5, -2.5, -4.0), + (Archaeos, _) => (3.0, 0.0, -4.0), (Odontotyrannos, _) => (3.5, 3.0, -4.0), }, leg: match (body.species, body.body_type) { - (Archaeos, _) => (4.5, -9.0, -4.0), - (Odontotyrannos, _) => (5.5, -6.5, -2.0), + (Archaeos, _) => (4.5, -3.0, -4.0), + (Odontotyrannos, _) => (5.5, -2.5, -2.0), }, foot: match (body.species, body.body_type) { - (Archaeos, _) => (1.0, -0.5, -8.0), + (Archaeos, _) => (1.0, -0.5, -7.0), (Odontotyrannos, _) => (-1.0, -6.5, -3.0), }, } diff --git a/voxygen/src/anim/src/theropod/run.rs b/voxygen/src/anim/src/theropod/run.rs index c607a53f8f..95e55f6050 100644 --- a/voxygen/src/anim/src/theropod/run.rs +++ b/voxygen/src/anim/src/theropod/run.rs @@ -26,39 +26,74 @@ impl Animation for RunAnimation { //let wavealt = (anim_time as f32 * 8.0 + PI / 2.0).sin(); //let wave_slow = (anim_time as f32 * 6.5 + PI).sin(); - next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1); - next.head.orientation = Quaternion::rotation_z(0.0); - next.head.scale = Vec3::one(); + let breathe = (anim_time as f32 * 0.8).sin(); + + let lab = 0.55; //.65 + let foothoril = (((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 foothorir = (((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 footrotl = (((5.0) + / (2.5 + + (2.5) + * ((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) + / (1.0 + + (4.0) + * ((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 short = (anim_time as f32 * lab as f32 * 16.0).sin(); + + + + next.head.position = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1+breathe * 0.3); + next.head.orientation = Quaternion::rotation_x(breathe * 0.1-0.1); + next.head.scale = Vec3::one()*1.02; next.jaw.position = Vec3::new(0.0, skeleton_attr.jaw.0, skeleton_attr.jaw.1); - next.jaw.orientation = Quaternion::rotation_z(0.0); - next.jaw.scale = Vec3::one(); + next.jaw.orientation = Quaternion::rotation_x(breathe * 0.05); + next.jaw.scale = Vec3::one()*0.98; - next.neck.position = Vec3::new(0.0, skeleton_attr.neck.0, skeleton_attr.neck.1); - next.neck.orientation = Quaternion::rotation_z(0.0); - next.neck.scale = Vec3::one(); + next.neck.position = Vec3::new(0.0, skeleton_attr.neck.0, skeleton_attr.neck.1+breathe * 0.2); + next.neck.orientation = Quaternion::rotation_x(-0.1); + next.neck.scale = Vec3::one()*0.98; next.chest_front.position = Vec3::new( 0.0, skeleton_attr.chest_front.0, - skeleton_attr.chest_front.1, - ); - next.chest_front.orientation = Quaternion::rotation_z(0.0); - next.chest_front.scale = Vec3::one(); + skeleton_attr.chest_front.1+breathe * 0.3, + )/3.0; + next.chest_front.orientation = Quaternion::rotation_x(breathe * 0.04); + next.chest_front.scale = Vec3::one()/3.0; next.chest_back.position = Vec3::new(0.0, skeleton_attr.chest_back.0, skeleton_attr.chest_back.1); - next.chest_back.orientation = Quaternion::rotation_z(0.0); + next.chest_back.orientation = Quaternion::rotation_x(breathe * -0.04); next.chest_back.scale = Vec3::one(); next.tail_front.position = Vec3::new(0.0, skeleton_attr.tail_front.0, skeleton_attr.tail_front.1); - next.tail_front.orientation = Quaternion::rotation_z(0.0); + next.tail_front.orientation = Quaternion::rotation_x(0.1); next.tail_front.scale = Vec3::one(); next.tail_back.position = Vec3::new(0.0, skeleton_attr.tail_back.0, skeleton_attr.tail_back.1); - next.tail_back.orientation = Quaternion::rotation_z(0.0); + next.tail_back.orientation = Quaternion::rotation_x(0.1); next.tail_back.scale = Vec3::one(); next.hand_l.position = Vec3::new( @@ -66,7 +101,7 @@ impl Animation for RunAnimation { skeleton_attr.hand.1, skeleton_attr.hand.2, ); - next.hand_l.orientation = Quaternion::rotation_z(0.0); + next.hand_l.orientation = Quaternion::rotation_x(breathe * 0.2); next.hand_l.scale = Vec3::one(); next.hand_r.position = Vec3::new( @@ -74,40 +109,43 @@ impl Animation for RunAnimation { skeleton_attr.hand.1, skeleton_attr.hand.2, ); - next.hand_r.orientation = Quaternion::rotation_z(0.0); - next.hand_l.scale = Vec3::one(); + next.hand_r.orientation = Quaternion::rotation_x(breathe * 0.2); + next.hand_r.scale = Vec3::one(); next.leg_l.position = Vec3::new( -skeleton_attr.leg.0, skeleton_attr.leg.1, - skeleton_attr.leg.2, + skeleton_attr.leg.2+breathe * 0.05, ); - next.leg_l.orientation = Quaternion::rotation_z(0.0); - next.leg_l.scale = Vec3::one(); + next.leg_l.orientation = + Quaternion::rotation_z(short * 0.18) * Quaternion::rotation_x(foothoril * 0.3); next.leg_l.scale = Vec3::one(); next.leg_r.position = Vec3::new( skeleton_attr.leg.0, skeleton_attr.leg.1, - skeleton_attr.leg.2, + skeleton_attr.leg.2+breathe * 0.05, ); - next.leg_r.orientation = Quaternion::rotation_z(0.0); + next.leg_r.orientation = + Quaternion::rotation_z(short * 0.18) * Quaternion::rotation_x(foothorir * 0.3); next.leg_r.scale = Vec3::one(); next.foot_l.position = Vec3::new( -skeleton_attr.foot.0, skeleton_attr.foot.1, - skeleton_attr.foot.2, + skeleton_attr.foot.2+breathe * -0.35, ); - next.foot_l.orientation = Quaternion::rotation_z(0.0); - next.foot_l.scale = Vec3::one(); + next.foot_l.orientation = + Quaternion::rotation_x(-0.1 + footrotl * 0.25); + next.foot_l.scale = Vec3::one()*1.02; next.foot_r.position = Vec3::new( skeleton_attr.foot.0, skeleton_attr.foot.1, - skeleton_attr.foot.2, + skeleton_attr.foot.2+breathe * -0.45, ); - next.foot_r.orientation = Quaternion::rotation_z(0.0); - next.foot_r.scale = Vec3::one(); + next.foot_r.orientation = + Quaternion::rotation_x(-0.1 + footrotr * 0.25); + next.foot_r.scale = Vec3::one()*1.02; next } diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index eda6fa8fb5..99cd5b040b 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -1122,6 +1122,16 @@ impl FigureMgr { skeleton_attr, ) }, + // Running + (false, _, true) => { + anim::quadruped_small::RunAnimation::update_skeleton( + &QuadrupedSmallSkeleton::default(), + (vel.0.magnitude(), ori, state.last_ori, time, state.avg_vel), + state.state_time, + &mut state_animation_rate, + skeleton_attr, + ) + }, // In air (false, _, false) => anim::quadruped_small::JumpAnimation::update_skeleton( &QuadrupedSmallSkeleton::default(), @@ -1215,7 +1225,15 @@ impl FigureMgr { ) }, // Running - (true, true, _) => anim::quadruped_medium::RunAnimation::update_skeleton( + (true, true, false) => anim::quadruped_medium::RunAnimation::update_skeleton( + &QuadrupedMediumSkeleton::default(), + (vel.0.magnitude(), ori, state.last_ori, time, state.avg_vel), + state.state_time, + &mut state_animation_rate, + skeleton_attr, + ), + //Swimming + (false, _, true) => anim::quadruped_medium::RunAnimation::update_skeleton( &QuadrupedMediumSkeleton::default(), (vel.0.magnitude(), ori, state.last_ori, time, state.avg_vel), state.state_time, @@ -1317,7 +1335,15 @@ impl FigureMgr { ) }, // Running - (true, true, _) => anim::quadruped_low::RunAnimation::update_skeleton( + (true, true, false) => anim::quadruped_low::RunAnimation::update_skeleton( + &QuadrupedLowSkeleton::default(), + (vel.0.magnitude(), ori, state.last_ori, time, state.avg_vel), + state.state_time, + &mut state_animation_rate, + skeleton_attr, + ), + // Swimming + (false, _, true) => anim::quadruped_low::RunAnimation::update_skeleton( &QuadrupedLowSkeleton::default(), (vel.0.magnitude(), ori, state.last_ori, time, state.avg_vel), state.state_time, @@ -1414,7 +1440,15 @@ impl FigureMgr { skeleton_attr, ), // Running - (true, true, _) => anim::bird_medium::RunAnimation::update_skeleton( + (true, true, false) => anim::bird_medium::RunAnimation::update_skeleton( + &BirdMediumSkeleton::default(), + (vel.0.magnitude(), time), + state.state_time, + &mut state_animation_rate, + skeleton_attr, + ), + // Running + (false, _, true) => anim::bird_medium::RunAnimation::update_skeleton( &BirdMediumSkeleton::default(), (vel.0.magnitude(), time), state.state_time,