Camera clipping and block-hop fix

This commit is contained in:
Joshua Barretto 2019-06-26 11:24:53 +01:00
parent 692fa3f28d
commit 4a340f69b5
2 changed files with 2 additions and 2 deletions

View File

@ -237,7 +237,7 @@ impl<'a> System<'a> for Sys {
if resolve_dir.z == 0.0
&& !collision_with(pos.0 + Vec3::unit_z() * 1.1, near_iter.clone())
{
pos.0.z += 1.0;
pos.0.z = (pos.0.z + 1.0).ceil();
on_ground = true;
break;
} else {

View File

@ -118,7 +118,7 @@ impl Scene {
let tilt = self.camera.get_orientation().y;
let dist = self.camera.get_distance();
self.camera
.set_focus_pos(player_pos + Vec3::unit_z() * (2.1 - tilt.min(0.0) * dist * 0.75));
.set_focus_pos(player_pos + Vec3::unit_z() * (1.95 - tilt.min(0.0) * dist * 0.75));
// Tick camera for interpolation.
self.camera.update(client.state().get_time());