-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Add per-tile flipping and transposing #80144
Conversation
52a3384
to
bd365b6
Compare
Finished: godot.windows.editor.dev.x86_64_ibsEFV55G2.mp4Although I still need to do some cleanup. Also, since transform is stored as part of alternate id now, the maximum number of alternate tiles per tile is now more limited (from 32768 to 4096). We should consider enforcing this limitation or documenting it. |
19b4e12
to
85dd3c6
Compare
Pattern rotating: godot.windows.editor.dev.x86_64_mOQwX7qU05.mp4 |
2ee7fd1
to
62f45f9
Compare
Rebased and squashed (there was no reason to keep the history after the recent rework). |
Sooo, looks mostly good. I wonder about the following situations though:
Maybe we might want to implement a way to disable the rotation buttons when height != width, and only allow flips ? That would avoid some confusion I believe. Though, for special cases, I guess we could have a way to "force rotations" anyway. Like maybe a checkbox or something. |
Big tiles seem to work fine: Zni0AoUdC6.mp4Not sure what confusion are you referring to. As for non-square tilesets, I don't have one to test how it works. Half-offset square doesn't seem to have problems with transforms. Hexagon tiles will probably look wrong when rotated, but I doubt anyone expects them to retain shape after rotating. Isometric tiles will probably be fine. |
Try with a pattern ;)
Same, try with a pattern there. Maybe the solution is to disable only for patterns and not single tiles there ? That would probably make sense I think. |
Still looks correct: godot.windows.editor.dev.x86_64_e4rmWQaPx4.mp4Half-offset squares rotate a bit weird, but they correctly fit into the grid: godot.windows.editor.dev.x86_64_98CYwP8KFO.mp4It doesn't break anything and produces a result expected from the given grid shape. |
Well, yeah, that's what I mean. If you have a more meaningful pattern (like you usually do) with a house or something, the rotation does not make any sense. I think the behavior in the second video should likely be not possible. |
Done. godot.windows.editor.dev.x86_64_p33ANo7nVz.mp4 |
d9135f3
to
eaaebd5
Compare
Rebased after #81070 EDIT: |
eaaebd5
to
a9f3154
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good overall. The only thing I am not sure about is whether or not the polygon cache should be in the TileMap itself or managed by the TileSet/TileSetAtlasSource itself. Just in case you might have several TileMaps sharing the same TileSet, it might be a bit more efficient.
Thanks! |
Closes godotengine/godot-proposals#3967
godot.windows.editor.dev.x86_64_ibsEFV55G2.mp4
godot.windows.editor.dev.x86_64_mOQwX7qU05.mp4