0
votes

I'm having major issues trying to resize/scale/reshape a b2body's fixture... I've read so many tutorials and since I'm a n3wb at box2d most of it doesn't make sense.

What I'm trying to do exactly is make the collision box of a b2body scale to a CCSprite in cocos2d as the sprite moves dynamically through the application.

Any reference code would be greatly appreciated, I know you have to destroy and recreate the fixture but I have no idea how to do it correctly! I've been at this for hours now with no success. Thanks!

1

1 Answers

0
votes

I think you need to create new fixture with new body. Please check out tutorial, it solve another problem, but you will learn many useful things (e.g. how to recreate body with new fixture):

http://www.raywenderlich.com/14302/how-to-make-a-game-like-fruit-ninja-with-box2d-and-cocos2d-part-1

http://www.raywenderlich.com/14393/how-to-make-a-game-like-fruit-ninja-with-box2d-and-cocos2d-part-2