From 38ef170b860ca5eae4402ac8e0d636e791aa5025 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Mon, 8 Jan 2024 22:22:03 +0000 Subject: [PATCH] Explain OrthographicProjection.scale (#11023) Alternative to https://github.com/bevyengine/bevy/pull/11022. (Also remove "in world units", it is probably a mistake.) --- crates/bevy_render/src/camera/projection.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/bevy_render/src/camera/projection.rs b/crates/bevy_render/src/camera/projection.rs index 637ca423cf..f1ab86d2aa 100644 --- a/crates/bevy_render/src/camera/projection.rs +++ b/crates/bevy_render/src/camera/projection.rs @@ -255,11 +255,16 @@ pub struct OrthographicProjection { /// /// Defaults to `ScalingMode::WindowSize(1.0)` pub scaling_mode: ScalingMode, - /// Scales the projection in world units. + /// Scales the projection. /// /// As scale increases, the apparent size of objects decreases, and vice versa. /// - /// Defaults to `1.0` + /// Note: scaling can be set by [`scaling_mode`](Self::scaling_mode) as well. + /// This parameter scales on top of that. + /// + /// This property is particularly useful in implementing zoom functionality. + /// + /// Defaults to `1.0`. pub scale: f32, /// The area that the projection covers relative to `viewport_origin`. ///