Skip to content

Parent scale.z affects child sprite z-index #4149

@meepleek

Description

@meepleek

Bevy version

0.6.1

Operating system & version

Win 11

What you did

Spawned a parented sprite and change the parent's scale.z to something other than 1.0

What you expected to happen

Z-index of a sprite wouldn't be affected at all or the transform of the sprite would affect it as well.

What actually happened

It's affected by the parent transforms

Additional information

Repro
https://github.com/SecretPocketCat/bevy_issue_repro/blob/sprite_index_scale/src/main.rs
(the expected order from bottom would be red, green, blue)
2022-03-08 11_18_46-bevy

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenA-TransformTranslations, rotations and scalesC-BugAn unexpected or incorrect behaviorD-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-Needs-Design-DocThis issue or PR is particularly complex, and needs an approved design doc before it can be merged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions