Skip to content

Commit

Permalink
compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Nov 21, 2024
1 parent 17813be commit 9571461
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rgis-camera/src/systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9571461

Please sign in to comment.