Search code examples
ioscocos2d-iphoneccsprite

CCSprite has weird white pixels around the border


I'm facing a weird problem in cocos2d for my iPhone game. I have created a PNG file as below

MyBalls.png 64x64 pixels

In cocos2d, I use CCSpriteSheet to get each ball all of the with PNG file. It works well until then.

However, the weird thing is that on the iPhone's screen, the ball has weird white pixels around the border, as shown in the below screenshot

enter image description here

I have done so many researches on the web. But every suggestion like using TexturePacker or reset the glBlendFunc didn't work :(

Do you have any idea?

Update: I try to used normal CCSprite with separate PNG file of only one ball, the problem is still! I guess that I have to configure the cocos2d sourcecode some how to get it worked.


Solution

  • I have figured out the issue. Not because of the graphic itself. It's because of the box2d create an outline for the b2Fixture on the back of the CCSprite. Here I posted a question for that specific question!

    http://www.cocos2d-iphone.org/forum/topic/25368?replies=1#post-132008