When I scale CCSprite with a physical application, the physical body does not scale (I have debugDraw on). How to scale physics?
I found this code to change the radius of a circular physical body, but it does not work on cocos2d v3 ..
for(ChipmunkCircleShape* newShape in self.chipmunkObjects)
{
if([newShape isKindOfClass:[ChipmunkCircleShape class]]) {
cpCircleShapeSetRadius([newShape shape],[newShape radius]*scale); // Unsafe Resize
cpCircleShapeSetOffset([newShape shape],ccpMult([newShape offset],scale));
}
}
source
share