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 071fd25 commit 0430ce1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "three-d-asset"
version = "0.9.1"
version = "0.9.2"
authors = ["Asger Nyman Christiansen <[email protected]>"]
edition = "2021"
description = "Load/save functionality for 3d applications."
Expand Down
2 changes: 1 addition & 1 deletion src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,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 0430ce1

Please sign in to comment.