Hey Nate, I looked at the 3rd example, It looks like I am supposed to get the 'worldX' and 'worldY' position of the bonedata.
I did this:
float LocationX = ((character.position.x) - ([character.characterspine findBone:@"Bone2"]->worldX) );
float LocationY = [character.characterspine findBone:@"Bone2"]->worldY + character.position.y;
FollowerSprite.position = ccp(LocationX, LocationY);
When the skeleton FlipX = YES, the object 'FollowerSprite' position is relatively in the correct position but since my sprite has an anchor point of (0.5,0.5) and the bones attachment doesn't, my sprite is offset by the anchor point.
When the Skeleton FlipX = NO, the object 'FollowerSprite' is not in the same location as the bone. Actually something really weird happens, the animation for that bone moves the bone in a right to left motion, when FlipX = NO, the sprite moves in the opposite direction so instead of moving right to left, it will move left to right.
I also had a problem getting the rotation of the sprite to match the rotation of the bone so I did this to fix it:
float SpriteRotation = [character.characterspine findBone:@"Bone2"]->SpriteRotation;
if (character.flipX == YES)
{
FollowerSprite.flipY = NO;
FollowerSprite.rotation = (SpriteRotation - 360) - 90;
}
if (character.flipX == NO)
{
FollowerSprite.flipY = YES;
FollowerSprite.rotation = -(SpriteRotation - 360) - 90;
}
It is most likely something on my side that I am doing wrong, or not seeing.. but as of now I'm stuck, can you help me out on this nate?