@@ -172,15 +172,14 @@ pub struct PanOrbitCamera {
172
172
/// Defaults to `None`.
173
173
pub pitch_lower_limit : Option < f32 > ,
174
174
/// Upper limit on the zoom. This applies to `radius`, in the case of using a perspective
175
- /// camera, or the projection scale in the case of using an orthographic
176
- /// camera. Note that the zoom value (radius or scale) will never go below `0.02`.
175
+ /// camera, or the projection's scale in the case of using an orthographic camera.
177
176
/// Defaults to `None`.
178
177
pub zoom_upper_limit : Option < f32 > ,
179
178
/// Lower limit on the zoom. This applies to `radius`, in the case of using a perspective
180
- /// camera, or the projection scale in the case of using an orthographic
181
- /// camera. Note that the zoom value (radius or scale) will never go below `0.02` .
182
- /// Defaults to `None `.
183
- pub zoom_lower_limit : Option < f32 > ,
179
+ /// camera, or the projection's scale in the case of using an orthographic camera.
180
+ /// Should always be >0 otherwise you'll get stuck at 0 .
181
+ /// Defaults to `0.05 `.
182
+ pub zoom_lower_limit : f32 ,
184
183
/// The sensitivity of the orbiting motion.
185
184
/// Defaults to `1.0`.
186
185
pub orbit_sensitivity : f32 ,
@@ -283,7 +282,7 @@ impl Default for PanOrbitCamera {
283
282
pitch_upper_limit : None ,
284
283
pitch_lower_limit : None ,
285
284
zoom_upper_limit : None ,
286
- zoom_lower_limit : None ,
285
+ zoom_lower_limit : 0.05 ,
287
286
force_update : false ,
288
287
}
289
288
}
@@ -413,10 +412,7 @@ fn pan_orbit_camera(
413
412
let apply_zoom_limits = {
414
413
let zoom_upper_limit = pan_orbit. zoom_upper_limit ;
415
414
let zoom_lower_limit = pan_orbit. zoom_lower_limit ;
416
- move |zoom : f32 | {
417
- zoom. clamp_optional ( zoom_lower_limit, zoom_upper_limit)
418
- . max ( 0.05 )
419
- }
415
+ move |zoom : f32 | zoom. clamp_optional ( Some ( zoom_lower_limit) , zoom_upper_limit)
420
416
} ;
421
417
422
418
let apply_yaw_limits = {
0 commit comments