From 9571461310e463497b473076d7585eeb856d04a7 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Thu, 21 Nov 2024 09:46:45 -0500 Subject: [PATCH] compile error --- rgis-camera/src/systems.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rgis-camera/src/systems.rs b/rgis-camera/src/systems.rs index 5873533..333c88c 100644 --- a/rgis-camera/src/systems.rs +++ b/rgis-camera/src/systems.rs @@ -97,7 +97,13 @@ fn zoom_camera_system( // Set mouse_offset based on the first event's coordinate if !set { set = true; - mouse_offset = crate::CameraOffset::from_coord(event.coord); + mouse_offset = match crate::CameraOffset::from_coord(event.coord) { + Ok(offset) => offset, + Err(e) => { + error!("Error creating camera offset: {}", e); + continue; + } + }; } // Adjust the camera scale based on the zoom amount from the event camera_scale.zoom(event.amount);