diff --git a/src/camera/sidescroll2d.rs b/src/camera/sidescroll2d.rs index daf3054f3..a06ce17e5 100644 --- a/src/camera/sidescroll2d.rs +++ b/src/camera/sidescroll2d.rs @@ -73,6 +73,16 @@ impl PanZoomCamera2d { self.update_projviews(); } + /// Gets the zoom step of the camera. + pub fn zoom_step(&self) -> f32 { + self.zoom_step + } + + /// Sets the zoom step of the camera. + pub fn set_zoom_step(&mut self, new_zoom_step: f32) { + self.zoom_step = new_zoom_step; + } + /// Move the camera such that it is centered on a specific point. pub fn look_at(&mut self, at: Vec2, zoom: f32) { self.at = at;