0

I'm making a game using Cocos2D and my sprites are kept in a TexturePacker sprite sheet. A couple of days ago I realized that nearly all of my sprites are missing a column of one to two pixels off their right side. The sprite png files and the texturepacker file display the sprites correctly, but ingame they look sliced. It looks like the sprite image itself is offcenter of its textureRect. This doesn't seem to happen with all the sprites, but I'm noticing it with enough of them that it may be.

So far I've tried messing around with TexturePacker settings but nothing is fixing it. Any ideas?

pdmorrill
  • 15
  • 4
  • Have you tried increasing the padding in texturepacker? – PWiggin Jun 05 '15 at 05:04
  • This was mostly a problem because I didn't want sprites that I had tiled to get messed up by changing the padding or the common divisor. I ended up moving those tiling sprites into another spritesheet so I could adjust the padding on the ones that were getting cut off. It isn't an actual solution, just a quick fix. – pdmorrill Jun 07 '15 at 17:06
  • The problem seems to be caused by a bug between texturepacker and the version of cocos2d I'm using (on the v2 branch still). Apparently v3 doesn't have this bug anymore, but it didn't make sense to update the entire game code right now because of a few pixels missing. In the future, though, I will be updating it and hopefully the issue will vanish. – pdmorrill Jun 07 '15 at 17:07

0 Answers0