mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix unequal zoom in distance and zoom out distance
This commit is contained in:
parent
877eaee151
commit
5d11adfd4c
@ -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
|
||||
|
||||
|
@ -344,8 +344,17 @@ impl Scene {
|
||||
},
|
||||
// Zoom the camera when a zoom event occurs
|
||||
Event::Zoom(delta) => {
|
||||
// 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user