From e066d987626ecf2948f6233a960d0be4f74c6ccf Mon Sep 17 00:00:00 2001 From: jshipsey Date: Sun, 16 Jun 2019 09:57:01 -0400 Subject: [PATCH] slight roll tweak, altered speeds in physics --- common/src/sys/phys.rs | 9 +++++---- voxygen/src/anim/character/roll.rs | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common/src/sys/phys.rs b/common/src/sys/phys.rs index 75d9d5ca7e..a7496282d5 100644 --- a/common/src/sys/phys.rs +++ b/common/src/sys/phys.rs @@ -10,13 +10,13 @@ use vek::*; const GRAVITY: f32 = 9.81 * 4.0; const FRIC_GROUND: f32 = 0.15; const FRIC_AIR: f32 = 0.015; -const HUMANOID_ACCEL: f32 = 100.0; -const HUMANOID_SPEED: f32 = 500.0; +const HUMANOID_ACCEL: f32 = 70.0; +const HUMANOID_SPEED: f32 = 120.0; const HUMANOID_AIR_ACCEL: f32 = 10.0; const HUMANOID_AIR_SPEED: f32 = 100.0; const HUMANOID_JUMP_ACCEL: f32 = 16.0; -const ROLL_ACCEL: f32 = 200.0; -const ROLL_SPEED: f32 = 800.0; +const ROLL_ACCEL: f32 = 140.0; +const ROLL_SPEED: f32 = 450.0; const GLIDE_ACCEL: f32 = 15.0; const GLIDE_SPEED: f32 = 45.0; // Gravity is 9.81 * 4, so this makes gravity equal to .15 @@ -129,6 +129,7 @@ impl<'a> System<'a> for Sys { vel.0.z += dt.0 * lift * Vec2::::from(vel.0 * 0.15).magnitude().min(1.0); } + // Roll if let Some(time) = rollings.get_mut(entity).map(|r| &mut r.time) { *time += dt.0; if *time > 0.7 { diff --git a/voxygen/src/anim/character/roll.rs b/voxygen/src/anim/character/roll.rs index 48e5ca8d46..2dc242ac0b 100644 --- a/voxygen/src/anim/character/roll.rs +++ b/voxygen/src/anim/character/roll.rs @@ -57,11 +57,11 @@ impl Animation for RollAnimation { Quaternion::rotation_x(wave_slow * 6.5) * Quaternion::rotation_y(wave * 0.3); next.r_hand.scale = Vec3::one(); - next.l_foot.offset = Vec3::new(-3.4, -0.1, 9.0 - 0.0 + wave_dub * -1.2); + next.l_foot.offset = Vec3::new(-3.4, -0.1, 9.0 - 0.0 + wave_dub * -1.2 + wave_slow * 4.0); next.l_foot.ori = Quaternion::rotation_x(wave * 0.6); next.l_foot.scale = Vec3::one(); - next.r_foot.offset = Vec3::new(3.4, -0.1, 9.0 - 0.0 + wave_dub * -1.0); + next.r_foot.offset = Vec3::new(3.4, -0.1, 9.0 - 0.0 + wave_dub * -1.0 + wave_slow * 4.0); next.r_foot.ori = Quaternion::rotation_x(wave * -0.4); next.r_foot.scale = Vec3::one();