You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, sometimes, the black mesh will appear above the red sprite. The order doesn't change at runtime and requires restarting the application, occurring about 50% of the time.
Adding a SpriteBundle to the parent, or removing the SpriteBundle from the child causes the bug to disappear. Changing the child to use a mesh instead of a sprite also fixes the issue.
Oh yeah, you're right. I did try that but it's sort of random so I guess I missed it. The original title isn't correct then, and this seems to have more do with sprites and meshes not ordering properly.
Bevy version
0.8.1
Relevant system information
Bug appears on both OS X and Windows. Does not occur on WASM.
What you did
I have a red
SpriteBundle
(with the default texture), and a blackMaterialMesh2dBundle
(withQuad
/ColorMaterial
).The red sprite has z of 1.
The black mesh has a z of 0.
The expectation is that the sprite will render above the mesh.
What went wrong
Adding a seemingly unrelated hierarchy causes the z ordering of these two entities to become unpredictable.
Now, sometimes, the black mesh will appear above the red sprite. The order doesn't change at runtime and requires restarting the application, occurring about 50% of the time.
Adding a SpriteBundle to the parent, or removing the SpriteBundle from the child causes the bug to disappear. Changing the child to use a mesh instead of a sprite also fixes the issue.
Additional information
Repro: https://github.com/jabuwu/bevy_z_issue
The text was updated successfully, but these errors were encountered: