From 6371d7ca4d0094a1f7b81df832eed26dc0f2102d Mon Sep 17 00:00:00 2001 From: mnmaita <47983254+mnmaita@users.noreply.github.com> Date: Wed, 20 Sep 2023 20:47:13 +0200 Subject: [PATCH] Revert "Update defaults for OrthographicProjection (#9537)" This reverts commit 5012a0fd57748ab6f146776368b4cf988bba1eaa. --- crates/bevy_render/src/camera/projection.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/bevy_render/src/camera/projection.rs b/crates/bevy_render/src/camera/projection.rs index a824d886c80aa..7b62385cac792 100644 --- a/crates/bevy_render/src/camera/projection.rs +++ b/crates/bevy_render/src/camera/projection.rs @@ -197,8 +197,6 @@ pub enum ScalingMode { /// /// Note that the scale of the projection and the apparent size of objects are inversely proportional. /// As the size of the projection increases, the size of objects decreases. -/// -/// Note also that the view frustum is centered at the origin. #[derive(Component, Debug, Clone, Reflect)] #[reflect(Component, Default)] pub struct OrthographicProjection { @@ -206,7 +204,7 @@ pub struct OrthographicProjection { /// /// Objects closer than this will not be rendered. /// - /// Defaults to `-1000.0` + /// Defaults to `0.0` pub near: f32, /// The distance of the far clipping plane in world units. /// @@ -317,7 +315,7 @@ impl Default for OrthographicProjection { fn default() -> Self { OrthographicProjection { scale: 1.0, - near: -1000.0, + near: 0.0, far: 1000.0, viewport_origin: Vec2::new(0.5, 0.5), scaling_mode: ScalingMode::WindowSize(1.0),