bevyengine / bevyengine/bevy

Parent scale.z affects child sprite z-index

Open
#4,149 4 comments 0 reactions 0 assignees View on GitHub
A-Rendering A-Transform C-Bug D-Complex S-Needs-Design-Doc
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

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)
![2022-03-08 11_18_46-bevy](https://user-images.githubusercontent.com/17273703/157217782-25c77cc6-e5ff-4220-bbea-c63f4806f916.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.