mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Camera clipping and block-hop fix
This commit is contained in:
parent
692fa3f28d
commit
4a340f69b5
@ -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 {
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user