mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Improved camera attributes and focus
Former-commit-id: 223f85c884c063c5cbb7d6c9f9f5c4a8c62a7ffd
This commit is contained in:
parent
2ea1de2659
commit
db527e64df
@ -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,
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user