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

fix!: adjust tile transformations for bevy_ecs_tilemap 0.8 #136

Merged
merged 17 commits into from
Nov 18, 2022

Conversation

Trouv
Copy link
Owner

@Trouv Trouv commented Nov 17, 2022

bevy_ecs_tilemap 0.7 anchored tiles to the bottom-left, while 0.8 anchors tiles to the center.

For example, the (0,0) tile used to render the bottom-left pixel of the tile at the origin, but it now renders the center of the tile at the origin.

Since bevy_ecs_ldtk adds transforms to tiles, the transform logic needed to be adjusted after updating to bevy_ecs_tilemap 0.8. This PR performs that update, which introduces a breaking change to some utility functions

To do

  • adjust translation of tilemaps to support layers of differing grid size
  • fix background color/image translation
  • redesign and add new translation utility functions to address layer adjustment if necessary

@Trouv Trouv changed the title fix!: adjust tile transformations for bevy_ecs_tilemap 0.8 tile position changes fix!: adjust tile transformations for bevy_ecs_tilemap 0.8 Nov 17, 2022
@Trouv Trouv marked this pull request as draft November 17, 2022 05:30
@Trouv
Copy link
Owner Author

Trouv commented Nov 17, 2022

Thought I fixed it but I think I actually just forgot to pull the bevy_ecs_tilemap update in main woops

@Trouv Trouv mentioned this pull request Nov 18, 2022
@Trouv Trouv marked this pull request as ready for review November 18, 2022 04:53
@Trouv Trouv merged commit aad0325 into main Nov 18, 2022
@Trouv Trouv mentioned this pull request Nov 18, 2022
@Trouv Trouv deleted the fix/tile-translations branch August 26, 2023 23:26
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

Successfully merging this pull request may close these issues.

1 participant