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

Inconsistent Z-layer of rendered tilemap #308

Closed
geirsagberg opened this issue Oct 8, 2022 · 4 comments
Closed

Inconsistent Z-layer of rendered tilemap #308

geirsagberg opened this issue Oct 8, 2022 · 4 comments

Comments

@geirsagberg
Copy link
Contributor

I have a background image as SpriteBundle, a player character as a SpriteSheetBundle and the tiled map as a TiledMapBundle. I have adjusted the Z transform of the background image and the player so that the player is showing in front of the background. However, the tiled map sometimes shows behind the background, and sometimes in front:

Screenshot 2022-10-08 122811
Screenshot 2022-10-08 122848

  • It seems completely random, with roughly a 50%/50% chance of the tilemap platforms showing up or not.
  • Adjusting the transform of the TiledMap has no effect

I do not quite understand the render pipeline of bevy_ecs_tilemap; how does it work? How can I ensure that the tilemap shows up in front of my background image?

My code is here: https://github.com/geirsagberg/rusted_chrome_2

@bzm3r
Copy link
Collaborator

bzm3r commented Oct 9, 2022

Hey, so this is an issue that is upstream, in bevy. It has been fixed on bevy's main: bevyengine/bevy#5942

See also related issue: bevyengine/bevy#6048

As for solutions: I will make a branch of bevy_ecs_tilemap that depends on bevy's main branch. Then, you can use this branch of bevy_ecs_tilemap in your work?

@geirsagberg
Copy link
Contributor Author

Excellent, thanks for the quick response :D And yes, a main-tracking branch would be sweet!

@StarArawn
Copy link
Owner

Excellent, thanks for the quick response :D And yes, a main-tracking branch would be sweet!

Done:
#310

Note: Not all examples are working yet, but it should be tracking bevy main and we'll get the examples updated soon!

@StarArawn
Copy link
Owner

@geirsagberg I'm marking this as closed since the issue is fixed in bevy main and we have a bevy-track branch. Please open a new issue if you think this is still a problem. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants