Skip to content

Gizmos always draw on 2d sprites, z value and depth_bias neither works #13027

Closed
@gloridifice

Description

@gloridifice

Bevy version

0.13.2

Content

I want gizmos lines draw behind 2d sprites. I tried Gizmos#line() with big negative z value and tried to change GizmosConfig#depth_bias to -1.0. Neither works.
And I tried Gizmos#line_2d() with -1.0 GizmosConfig#depth_bias, it not works too.

Snipaste_2024-04-19_15-30-41
fn setup_gizmo_config(mut config_store: ResMut<GizmoConfigStore>) {
    for (_, config, _) in config_store.iter_mut() {
        config.depth_bias = -1.0;
        config.line_width = 1.0;
    }
}
gizmos.line(start1, end1, color);
gizmos.line(start2, end2, color);

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-GizmosVisual editor and debug gizmosA-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions