Why does the physics detection stop to work when playing animation?

I’m developing a physics game using cocos2d-x + box2d. And I use LevelHelper and SpriteHelper.
In this game, a squirrel needs to kick a nut just like a football player kick a ball. So I draw 30 frames for squirrel animation, and each frame has a different shape that I draw in the SpriteHelper. But when I run the animation of the squirrel, I suppose the nut is kicked off when the leg of the squirrel touches the nut. But the fact is, no contact is detected and the nut doesn’t move at all when the squirrel kick the nut. It seems the physics engine just use the shape of the first frame in the animation, and ignores the real shape for each frame in the animation.
So, how to fix this problem? Any help is very appreciated. I’m not sure if this is a general problem or it just happens when using sprite helper and level helper.
Thanks.

I think that box2d does not support frame animation of the fixture,
you need to reproduce the fixture for each frame,
or create animations with several body and joint, and possibly other methods.

Sorry, my english is bad.

You are right. I just got the same answer from the author of level helper and sprite helper. What I want to do is impossible. Even if it could, it would kill fps.
I’m trying some other workaround solution.
Thanks for your reply.

Misha Philypchuk wrote:

I think that box2d does not support frame animation of the fixture,
you need to reproduce the fixture for each frame,
or create animations with several body and joint, and possibly other methods.
>
Sorry, my english is bad.

Sorry to bring up an old post but i have this exact problem. Can i ask what your work around is/was please?

Workaround is simple, adding one user data of one frame in the editor and check it in the code.
For example, there are 30 frames for the animation of the squirrel kicking the nut. And every time when the squirrel kicks the nut, the distance between the squirrel and the nut is the same. So I can find the number of the frame about when the leg of the squirrel touches the nut. Then I add one key-value in the user data of this frame in sprite helper. In the code, I check the callback of changing every frame, if there is one frame has the user data, call the function to kick the nut.
Hope it could help you.

Alex James wrote:

Sorry to bring up an old post but i have this exact problem. Can i ask what your work around is/was please?

good idea.