Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

z_layer_2d is both confusing and buggy, should be removed #423

Open
djeedai opened this issue Feb 7, 2025 · 0 comments
Open

z_layer_2d is both confusing and buggy, should be removed #423

djeedai opened this issue Feb 7, 2025 · 0 comments
Labels
A - components Change related to an ECS component C - breaking change A breaking API or behavior change C - bug Something isn't working

Comments

@djeedai
Copy link
Owner

djeedai commented Feb 7, 2025

Crate versions

main

Describe the bug

z_layer_2d for 2D effects is used in place of the transform.z, which 1) makes things confusing for users, and 2) seems buggy with parenting. There's really no reason for having it. Bevy's Mesh2d and Sprite pass the transform.z as the Transparent2d.sort_key value, and Hanabi should do the same.

Expected behavior

Particle effect with larger Z position renders on top in 2D. That's not currently always the case.

To Reproduce

See 2d example; disable the animation system update_plane() and change z_layer_2d and transform.z of the particle effect: the former moves the particles in front of and behind the quad, the latter does nothing.

@djeedai djeedai added A - components Change related to an ECS component C - breaking change A breaking API or behavior change C - bug Something isn't working labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A - components Change related to an ECS component C - breaking change A breaking API or behavior change C - bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant