0 votes

In my current project I'm using a tilemap. While this works very good I have a minor problem: my tile data is already existing in a format I cannot change. The map described in this format expects a map has its 0|0 point at the left most edge. Godots isometric tilemap however has its 0|0 origin at the topmost edge - which results in a map rotated by 90°.

Blue: godot's tilemap origin, Red: expected tilemap origin
Blue: godot's tilemap origin, Red: expected tilemap origin

I cannot simple rotate the tilemap object because it is a isometric map.. therefore: is there a possibility to change the map origin or do I have to "rotate" the tiles during parsing of the map file?

in Engine by (12 points)

1 Answer

0 votes

my tile data is already existing in a format I cannot change.

What kind of format is this? From my understanding all tiles are 2D images and as such can be edit at any time.
Could you elaborate or provide the file so we can see if it is possible to help you.

therefore: is there a possibility to change the map origin or do I
have to "rotate" the tiles during parsing of the map file?

Both is possible to a limited extend. Once you make the tile map you can set the origin to 3 points (Top left, Center, Bottom Left).
You will also be able to rotate the tiles by 90 degrees increments, after the tile map is made. I think this solves your problem.

The thing that bothers me is that the origin only says where a tile starts, it has no other job. So it shouldn't be rotating your tile, only move it around.

Could you provide an example?

by (1,445 points)

Okay, let me clarify:

I'm not bothered about the tiles but about the tilemap.
My tilemap is already existing in a custom text-based format, as this is an existing server-client application where I "just" rewrite the client-part. As map-creation etc. underlies an already used workflow I cannot just change the map-format. (Generally its a list of coordinates and tile-ids at these coordinate).

However this map-format assumes that the 0|0 coordinate is at the left-most point of the tilemap (assuming there are no negative coords). In godot, however, this coordinate is at the top-most point. This leads the fact that the tilemap is rotated by 90° - not the single tiles but the map itself! (Which will confuse existing players).

With the map being isometric it is not possible to rotate the map simply by 90 degrees as their width/height values are quite different.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.