Question

I have created a single body in box2D, which consists of 2 fixtures. I have a CCSprite userData for each fixture, but i don't know how to set the sprite position and rotation to match the fixture shape...i can't find shape.position or fixture.position in the docs.

What i'm missing ?

Thanks!

Was it helpful?

Solution

I am not an expert at cocos2d and box2d myself and I am just learning both at the moment, but is there any reason why you can't just create a separate body for each fixture and then fix them together with a joint of some sort then assign the CCSprite userdata to each body?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top