I am not sure if you mean this but as I understood you want to know how to draw fixtures for an armature which will be added to body. Here is a Image where I show how to do that. After that you can just use your code to create a body all these fixtures will be loaded in.
What do you mean? Just in box2d or in cocostudio? And have you tried to change the PT_RATIO at CCColliderDetector.h? Could you mayby send me a screenshot with what you see in-game.
Hey,
I have tried your project and I found out you have the same problem as I had. The armature is following the wrong coordinate for its body. Here is a small explaination what i mean. I have scales the level by 0.2f. Here is code which you had.
As you can see there is a body but it’s on the wrong loaction. Now I set armature to insvisible, and now you can see the mass point or the origin of the armature is on the place where the armature is so its also on wthe wrong location.
I have had this problem before when I wanted to add a body to my armature but I didn’t succeded to fix this I have no Idea whats wrong with the code It just looks like the fixtures are moving and body also. I have created a topic about this but nobody has answered my question. Here is my helloworldclass code In which you can clearly see whats wrong. The armature is hidden in there and I applied a force to body and you see how the origin of teh body is moving.
The class I added in attachments.HelloWorldScene.zip (2.2 KB)
I have just changed the coordinates of armature before creating body to Point(0.0f,0.0f).
And I have no idea if this is a bug or I am doing something wrong but I think it’s a bug.
I use chipmunk, instead box2d. Bug is the same. I think that’s Cocostudio bug
I’m very bored. You know that we have 2 animation
Spritesheet ( by SpirteFrame )
Skeleton ( by Cocostudio )
And I have trouble with both when setting physic body
Skeletion: position of body
Spritesheet: I can’t change many body ( or fixture? ) when frame change => we have animation with spriteframe, but body doesn’t change => it’s not FIT with animation
I have also no idea how to fix this I guess we have to post it in issues topic? But mayby I have another solution for you which I use in my game together with my armature. I just use PhysicsEditor You can create your fixtures and add to your body you can also create multiple and change them everytime. I just take a screen picture of my armature and load it into physicseditor. Then I create the fixture and then I just add it to my body and set armature as userdata of my body. I hope this will help you.