I need to have a static shape that's attached to a sprite, (or a sprite that's attached to a static shape, whichever way around it is). But I also need the sprite to have an off centre anchor point.
But when the anchor point is changed, the sprite and the shape are no longer aligned, as in this image...

the right hand image shows what happens when I change the sprites anchor point.
I'm using SpaceManager and i'm setting it up like this
// create the sensor
sensor = [spaceMgr addRectAt:pPoint mass:STATIC_MASS width:53 height:81 rotation:0];
sensor->sensor = YES;
sensor->collision_type = 2;
//Create sprites
CCTexture2D *texture = [[CCTextureCache sharedTextureCache] addImage:@"bownce-sprites-comic-sized.png"];
barrel = [[cpCCSprite node] initWithShape:sensor texture:texture rect:CGRectMake(3, 428, 53, 82)];
[self addChild:barrel];
// set the ancor point
[self setAnchorPoint:ccp(0.5, 0.3)];
[barrel setPosition:pPoint];
Anyway, what I would like is to be able to change the anchor point and still have the sprite and the shape aligned properly since I will be rotating the sprite. Am I overlooking something basic here?
cheers
-t