Skip to content

Commit

Permalink
Fix Camera::set_zoom_factor
Browse files Browse the repository at this point in the history
  • Loading branch information
asny committed Dec 17, 2024
1 parent 20bfe42 commit a5d6420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ impl Camera {
///
pub fn set_zoom_factor(&mut self, zoom_factor: f32) {
let zoom_factor = zoom_factor.max(std::f32::EPSILON);
let position = self.target + self.view_direction() / zoom_factor;
let position = self.target - self.view_direction() / zoom_factor;
self.set_view(position, self.target, self.up);
}

Expand Down

0 comments on commit a5d6420

Please sign in to comment.