Search code examples
iphonecocos2d-iphoneccsprite

Cocos2D dragging sprite makes game pause


I'm using Cocos2D to place ccsprites on the screen. I then wrote code to allow the user to drag the sprites around the screen. this works fine in the simulator, but on my real iPhone 3GS, when i drag a sprite, the game seems to be paused until I stop dragging the sprite and the sprite jumps to where i released my finger. the constantly changing Frames per second number in the bottom left corner even freezes. anyone have any clue whats going on? im detecting the touch with the - (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event method.


Solution

  • I had a lot of NSLog statements, which were running very quickly on my Mac, but slowed my iphone down to a stand still! commenting them out fixed the problem. hope this helps someone with the same problem.