diff --git a/common/src/sys/phys.rs b/common/src/sys/phys.rs index 85f8aa6e33..55af3b389b 100644 --- a/common/src/sys/phys.rs +++ b/common/src/sys/phys.rs @@ -10,7 +10,7 @@ use crate::{ // Basic ECS physics system pub struct Sys; -const GRAVITY: f32 = 9.81; +const GRAVITY: f32 = 9.81 * 2.0; impl<'a> System<'a> for Sys { type SystemData = ( @@ -31,12 +31,12 @@ impl<'a> System<'a> for Sys { // Basic collision with terrain let mut i = 0; while terrain - .get(pos.0.map(|e| e as i32)) + .get(pos.0.map(|e| e.floor() as i32)) .map(|vox| !vox.is_empty()) .unwrap_or(false) && - i < 20 + i < 80 { - pos.0.z += 0.01; + pos.0.z += 0.005; vel.0.z = 0.0; i += 1; } diff --git a/voxygen/src/anim/character/idle.rs b/voxygen/src/anim/character/idle.rs index c3d335654f..a3f39dfc38 100644 --- a/voxygen/src/anim/character/idle.rs +++ b/voxygen/src/anim/character/idle.rs @@ -67,8 +67,7 @@ impl Animation for IdleAnimation { next.weapon.ori = Quaternion::rotation_x(2.5); next.weapon.scale = Vec3::one(); - - next.torso.offset = Vec3::new(0.0, 0.0, 0.0); + next.torso.offset = Vec3::new(-0.5, 0.0, 0.0); next.torso.ori = Quaternion::rotation_y(0.0); next.torso.scale = Vec3::one() / 11.0; diff --git a/voxygen/src/anim/character/run.rs b/voxygen/src/anim/character/run.rs index 33a8e79b95..c548c1d83e 100644 --- a/voxygen/src/anim/character/run.rs +++ b/voxygen/src/anim/character/run.rs @@ -67,7 +67,7 @@ impl Animation for RunAnimation { next.weapon.ori = Quaternion::rotation_x(2.5); next.weapon.scale = Vec3::one(); - next.torso.offset = Vec3::new(0.0, 0.0, 0.0); + next.torso.offset = Vec3::new(-0.5, 0.0, 0.0); next.torso.ori = Quaternion::rotation_y(0.25 + wavecos * 0.1); next.torso.scale = Vec3::one() / 11.0; diff --git a/voxygen/src/mesh/terrain.rs b/voxygen/src/mesh/terrain.rs index e736d2a503..b6cd2dd67e 100644 --- a/voxygen/src/mesh/terrain.rs +++ b/voxygen/src/mesh/terrain.rs @@ -95,7 +95,7 @@ impl Meshable for Dyna { .unwrap_or(true) { mesh.push_quad(create_quad( - -Vec3::one() + pos.map(|e| e as f32), + offs, Vec3::unit_x(), Vec3::unit_z(), -Vec3::unit_y(), diff --git a/voxygen/src/scene/figure.rs b/voxygen/src/scene/figure.rs index 08362b3e3f..1e2e9819db 100644 --- a/voxygen/src/scene/figure.rs +++ b/voxygen/src/scene/figure.rs @@ -257,7 +257,7 @@ impl FigureState { let mat = Mat4::::identity() * Mat4::translation_3d(pos) * - Mat4::rotation_z(dir.y.atan2(dir.x));// + f32//::consts)::PI / 2.0); + Mat4::rotation_z(-dir.x.atan2(dir.y));// + f32//::consts)::PI / 2.0); let locals = FigureLocals::new(mat); renderer.update_consts(&mut self.locals, &[locals]).unwrap();