I am making an iPhone app using cocos2d and I have a CCSprite and I need to convert it to a CCTexture2d so I can put it into box2d. Here is the code I have so far, It crashes with a runtime error...
//Set up sprite
// Use batch node. Faster
CCSprite *parent = [CCSpriteBatchNode batchNodeWithFile:@"egg.png" capacity:100];
eggSprite_ = [CCSprite spriteWithTexture:[parent texture]];
[eggSprite_ setScaleX: .5/eggSprite_.contentSize.width];
[eggSprite_ setScaleY: .5/eggSprite_.contentSize.height];
[eggSprite_ setTexture:eggTexture_];
[self addChild:parent z:0 tag:kTagParentNode];