From db527e64dff618633bcbe1fdddaf8dbdd14c0e9a Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Tue, 16 Apr 2019 19:01:56 +0100 Subject: [PATCH] Improved camera attributes and focus Former-commit-id: 223f85c884c063c5cbb7d6c9f9f5c4a8c62a7ffd --- voxygen/src/scene/camera.rs | 2 +- voxygen/src/scene/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/voxygen/src/scene/camera.rs b/voxygen/src/scene/camera.rs index 750bd1e359..29a2d777ec 100644 --- a/voxygen/src/scene/camera.rs +++ b/voxygen/src/scene/camera.rs @@ -21,7 +21,7 @@ impl Camera { Self { focus: Vec3::unit_z() * 10.0, ori: Vec3::zero(), - dist: 150.0, + dist: 10.0, fov: 1.3, aspect, } diff --git a/voxygen/src/scene/mod.rs b/voxygen/src/scene/mod.rs index 216601114a..b7fb9352f3 100644 --- a/voxygen/src/scene/mod.rs +++ b/voxygen/src/scene/mod.rs @@ -97,7 +97,7 @@ impl Scene { }, // Zoom the camera when a zoom event occurs Event::Zoom(delta) => { - self.camera.zoom_by(-delta); + self.camera.zoom_by(delta * 0.3); true }, // All other events are unhandled @@ -118,7 +118,7 @@ impl Scene { .unwrap_or(Vec3::zero()); // Alter camera position to match player - self.camera.set_focus_pos(player_pos); + self.camera.set_focus_pos(player_pos + Vec3::unit_z() * 1.5); // Compute camera matrices let (view_mat, proj_mat, cam_pos) = self.camera.compute_dependents();