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

get rotaion of tile #269

Closed
LuckyTurtleDev opened this issue May 19, 2023 · 3 comments
Closed

get rotaion of tile #269

LuckyTurtleDev opened this issue May 19, 2023 · 3 comments

Comments

@LuckyTurtleDev
Copy link

It is possible to get the rotation of a tile?
I was not able to find this at the doc. The Map has a global Orientation, but I don't see an option to get the the Orientation per tile, how Tield does also support (see below).

image

@aleokdev
Copy link
Contributor

You can get its flip bits directly from LayerTile: https://docs.rs/tiled/latest/tiled/struct.LayerTileData.html
From there you can calculate the corresponding rotation. IIRC I don't think Tiled has a rotation option per tile, only these flip bits

@LuckyTurtleDev
Copy link
Author

LuckyTurtleDev commented May 19, 2023

Thanks for the fast response. I have over look that LayerTile impl Deref LayerTileData.

@aleokdev
Copy link
Contributor

Related to #212

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