How do you get the bounds for a tilegid at a certain point? Is this possible?
Get TileGid bounds?
(3 posts) (3 voices)-
Posted 1 year ago #
-
Can you be more specific?
Do you know where the tile is you are looking for? You can find a tiles position by using something like the following:
CGPoint _tileLoc = [<CCTMXlayer> positionAt:ccp(<tileX>,<tileY>)];That will give you the cords on the layer for the tile. Without more specifics of what you are trying to do I'm just guessing.
Posted 1 year ago # -
Following on from what Verisutha said, with each tile being a CCSprite you can grab the bounds for the tile from the sprite's 'boundingBox' method.
CCSprite *myTileSprite = [<tmxLayer> tileAt:ccp(<tileX>, <tileY>)]; CGRect myTileBounds = [mytile boundingBox];yeti
Posted 1 year ago #
Reply
You must log in to post.