From f8cbc735ba699604ffa2293c368701370c92ab6d Mon Sep 17 00:00:00 2001 From: ira Date: Wed, 11 Oct 2023 08:23:03 +0200 Subject: [PATCH] Document that gizmo `depth_bias` has no effect in 2D (#10074) --- crates/bevy_gizmos/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/bevy_gizmos/src/lib.rs b/crates/bevy_gizmos/src/lib.rs index e1d05f3461..2efaa9c914 100644 --- a/crates/bevy_gizmos/src/lib.rs +++ b/crates/bevy_gizmos/src/lib.rs @@ -155,6 +155,8 @@ pub struct GizmoConfig { pub line_perspective: bool, /// How closer to the camera than real geometry the line should be. /// + /// In 2D this setting has no effect and is effectively always -1. + /// /// Value between -1 and 1 (inclusive). /// * 0 means that there is no change to the line position when rendering /// * 1 means it is furthest away from camera as possible @@ -162,7 +164,7 @@ pub struct GizmoConfig { /// /// This is typically useful if you are drawing wireframes on top of polygons /// and your wireframe is z-fighting (flickering on/off) with your main model. - /// You would set this value to a negative number close to 0.0. + /// You would set this value to a negative number close to 0. pub depth_bias: f32, /// Configuration for the [`AabbGizmo`]. pub aabb: AabbGizmoConfig,