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

Do we need to convert the Y axis? #41

Open
darkautism opened this issue Oct 22, 2024 · 4 comments
Open

Do we need to convert the Y axis? #41

darkautism opened this issue Oct 22, 2024 · 4 comments

Comments

@darkautism
Copy link

darkautism commented Oct 22, 2024

I'm on the way to resolve #39 .
But I found something weird.
image
Left Top should been 0,0
image
InGame:
image

@darkautism
Copy link
Author

darkautism commented Oct 22, 2024

Yes, this cause bugs.
image
image
Since we are rendering from the bottom left, this will cause the sort order to be abnormal.

In Game:
image
image

@darkautism
Copy link
Author

darkautism commented Oct 22, 2024

Ok, I found something in my old PR: StarArawn/bevy_ecs_tilemap#405.
It seems that bevy_ecs_tilemap does not support reversing the y-axis.
This means that even if I perform the correct calculations, I can’t get the texture to display correctly.
Or can we actually flip the y-axis ourselves?

@adrien-bon
Copy link
Owner

adrien-bon commented Oct 22, 2024

Hey!
I just tried both your tiledtest_y_even and tiledtest_y_odd maps from #39 and I actually see the expected rendering. I don't understand what is the issue.
What's the problem with not having the same reference between Tiled and bevy_ecs_tilemap ?
If you really want, you could have some kind of translation function and convert from one reference to the other.

@darkautism
Copy link
Author

The map high will cause render bug.
You can change map high to odd/even to check render effect.

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

2 participants