Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Zylann | |
Old Version | Published before Godot 3 was released. |
I am trying to make two versions of a tile which uses the same image, but one must be offset for convenience. The problem is, I can’t figure out how to properly add an offset without breaking the mirror mechanic when painting the map.
I tried to use the “centered = false” option, but when I mirror or rotate the sprite, it takes wrong positions:
I tried to use “centered = true”, but now the offset param is not applied as I expected, and mirroring is even worse:
I can’t reduce the tiles size because they are meant to be rotated inside 32x32 rects and some aren’t that “square”.
The only fix I have in mind is to have a separate sprite that just has 32x16 of whitespace on its left… but I really don’t want to repeat all border tiles needing that offset just for that
Any ideas?
Which version of godot are you using, and did it work before?
Bojidar Marinov | 2016-04-06 18:00
I’m using Godot 2.0.1, it’s the first time I try to do it.
Zylann | 2016-04-06 20:45
Can you provide a sample project to reproduce it.
neikeq | 2016-04-07 11:48
Here is a project: http://zylannprods.fr/dl/godot/OffsetTile.zip
Zylann | 2016-04-07 16:35
I did some changes recently to the TileMap behaviour when flipped, but I recreated your sample project in 1.1 and it gives me the same results as in 2.0. Can you give us an image of how you expect it to look?
neikeq | 2016-04-08 17:31
This is what I expect, with a few flip options (still using the same texture as in the project I linked):
(I edited the screenshot so it looks like what I expect)
Zylann | 2016-04-08 18:40