map: faster zoom speed

This commit is contained in:
yuni 2024-11-25 23:30:15 +01:00
parent 16d7a9ae2d
commit fa504097bb

View file

@ -397,7 +397,7 @@ pub fn update_map_camera(
}
mapcam.target_zoom_level =
(mapcam.target_zoom_level * 1.1f64.powf(change_zoom)).clamp(min_zoom, max_zoom);
let zoom_speed = 0.05; // should be between 0.0001 (slow) and 1.0 (instant)
let zoom_speed = 0.50; // should be between 0.0001 (slow) and 1.0 (instant)
mapcam.zoom_level = (zoom_speed * mapcam.target_zoom_level
+ (1.0 - zoom_speed) * mapcam.zoom_level)
.clamp(min_zoom, max_zoom);