I tried cocos2d TileMap sample from here, In this tilecord returned for given player position is wrong.
Here is code
Point HelloWorld::tileCoordForPosition(Point position)
{
int x = position.x / mTileMap->getTileSize().width;
int y = ((mTileMap->getMapSize().height * mTileMap->getTileSize().height) - position.y) / mTileMap->getTileSize().height;
return Point(x, y);
}
Also tileCord returned is wrong. So collision is not working. I used it from sample in Ray Wenderlich site
Here is full sample code https://app.box.com/s/whunv70tstwxbgzxdvxfeu080y6gwucb
If anyone has time, then check it and please help me to find bug.