2D Toolkit Forum

2D Toolkit => Support => Topic started by: Extant on April 20, 2013, 04:10:06 pm

Title: Isometric tilemap positions
Post by: Extant on April 20, 2013, 04:10:06 pm
Hello, I'm not sure if this is a bug or intended behavior.

The tile positions when selecting isometric tilemap do not change when selecting isometric in the type properties of the tilemap and reflect those of normal rectangular tiles.

Therefore the positioning is always off for from the actual centre point position of the tile for every second tile.

Eg:

Code: [Select]
var pos = tileMap.GetTilePosition(0,0); // will return (-31.3, 015.6, 0) 
var pos2 = tileMap.GetTilePosition(0,1); // will return (-31.3, 0, 0)  which has same x position, when both x and y should increase since the row above does not align with row below

There a fix around this? Otherwise I will have to edit the source files to represent their true positions.

Thanks.
Title: Re: Isometric tilemap positions
Post by: unikronsoftware on April 21, 2013, 12:03:14 am
This is a bug. Please work around it for now - I will fix it for the next release. As you say, it needs to offset by half a tile for every other tile.
Title: Re: Isometric tilemap positions
Post by: Extant on April 21, 2013, 02:31:48 am
Understood.

Thanks.
Title: Re: Isometric tilemap positions
Post by: rc183 on November 08, 2013, 03:21:32 pm
This issue is always present in the version 2.3 of 2d toolkit ?

I have tile with size 32x16 and the positions are not correct but if i set the size of the tiles to 32x8 it's Ok for the positioning but maybe can be generate other issues.

Thank you in advance for your help.
Title: Re: Isometric tilemap positions
Post by: unikronsoftware on November 09, 2013, 09:56:48 am
Set it up so the diamond is drawn correctly in scene view - it doesn't matter what the size is. That is what the rest of the system uses.