Hello all, Im having problem with the tile map coordinate. It reads reversely.
Here is my code:
TMXTiledMap *map = [TMXTiledMap tiledMapWithTMXFile:@"level1.tmx"];
[self addChild:map];
Sprite *soldier = [Sprite spriteWithFile:@"archer_front_01.png"];
[self addChild:soldier];
TMXLayer *layer = [map layerNamed:@"Layer 0"]; //
AtlasSprite *tile = [layer tileAt:ccp(0,1)]; // <------------ When i try to print the location of this, it will return reverse coordinate
for example I NSLog out this:
NSLog(@"TileX: %f TileY: %f", tile.position.x, tile.position.y); <-----It should come out with tileMap position but it print ccp. Any helps?