Skip to content

DebugUiPlugin doesn't respect scale factor properly #16666

@JeanMertz

Description

@JeanMertz

Bevy version

0.15

What you did

Enable DebugUiPlugin's outline drawing.

What went wrong

Outline is twice the size of the actual nodes.

Additional information

This seems to be introduced by #16375, which did not update the debug implementation here:

fn new(trans: &GlobalTransform, node: &ComputedNode, scale: f32) -> Self {
let mut this = Self {
pos: trans.translation().xy() * scale,
size: node.size() * scale,
};
this.pos -= this.size / 2.;
this
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed upon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions