Change FP Mode distance to 0.1 to fix building

This commit is contained in:
Piotr Korgól 2019-07-24 15:02:52 +02:00
parent 00f490c3bf
commit e33deac740

View File

@ -116,7 +116,7 @@ impl Camera {
pub fn zoom_by(&mut self, delta: f32) {
if self.can_zoom {
// Clamp camera dist to the 0 <= x <= infinity range
self.tgt_dist = (self.tgt_dist + delta).max(2.0);
self.tgt_dist = (self.tgt_dist + delta).max(2.0).min(100.0);
}
}
@ -176,12 +176,12 @@ impl Camera {
match self.mode {
CameraMode::ThirdPerson => {
self.can_zoom = true;
if self.tgt_dist == 0.0 {
if self.tgt_dist == 0.1 {
self.zoom_by(5.0);
}
},
CameraMode::FirstPerson => {
self.set_distance(0.0);
self.set_distance(0.1);
self.can_zoom = false;
},
}