-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Parent scale.z affects child sprite z-index #4149
Copy link
Copy link
Open
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenA-TransformTranslations, rotations and scalesTranslations, rotations and scalesC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite 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 mergedThis issue or PR is particularly complex, and needs an approved design doc before it can be merged
Description
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)

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenA-TransformTranslations, rotations and scalesTranslations, rotations and scalesC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite 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 mergedThis issue or PR is particularly complex, and needs an approved design doc before it can be merged