From c1e76d09a96d338e22cc0639e22b3490c07b7177 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 22 Apr 2024 00:07:45 +0200 Subject: [PATCH] Space now resets the map camera --- src/camera.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/camera.rs b/src/camera.rs index e0bc50c..610ae45 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -193,6 +193,10 @@ pub fn update_map_camera( if keyboard_input.pressed(settings.key_left) { offset_z += 1.0; } + if keyboard_input.pressed(settings.key_stop) { + mapcam.offset_x = 0.0; + mapcam.offset_z = 0.0; + } // Update zoom level if !mapcam.initialized {