diff --git a/CHANGELOG.md b/CHANGELOG.md index de1a7c7400..817b10df57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added leaf and chimney particles ### Changed -- Fixed a bug where leaving the Settings menu by pressing "N" in single player kept the game paused + +- Fixed a bug where leaving the Settings menu by pressing "N" in single player kept the game paused. - The world map has been refactored to support arbitrary sizes and compute horizon maps. - Veloren's lighting has been completely overhauled. - The graphics options were made much more flexible and configurable. @@ -23,7 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Animation and terrain math were switched to use SIMD where possible, improving performance. - The way we cache glyphs was refactored, fixed, and optimized. - Colors for models and figures were adjusted to account for the saturation hack. -- Fixed a bug where the closest item would be picked up instead of a selected item +- Fixed a bug where the closest item would be picked up instead of a selected item. +- Fixed a bug where camera zoom in and zoom out distance didn't match. ### Removed diff --git a/voxygen/src/scene/mod.rs b/voxygen/src/scene/mod.rs index eb2ac72d2c..7e47fdeb72 100644 --- a/voxygen/src/scene/mod.rs +++ b/voxygen/src/scene/mod.rs @@ -344,8 +344,17 @@ impl Scene { }, // Zoom the camera when a zoom event occurs Event::Zoom(delta) => { - self.camera - .zoom_switch(delta * (0.05 + self.camera.get_distance() * 0.01)); + // when zooming in the distance the camera travelles should be based on the + // final distance. This is to make sure the camera travelles the + // same distance when zooming in and out + if delta < 0.0 { + self.camera.zoom_switch( + delta * (0.05 + self.camera.get_distance() * 0.01) / (1.0 - delta * 0.01), + ); // Thank you Imbris for doing the math + } else { + self.camera + .zoom_switch(delta * (0.05 + self.camera.get_distance() * 0.01)); + } true }, Event::AnalogGameInput(input) => match input {