I tested this method a bit, and I can't quite understand the values I get as I change the anchor point.
(0,0) anchor point is top left, right? (1,0) top right, (1,0) bottom left, and (1,1) bottom right. so far so good?
I have a sprite, 40 px width and 30 px height. I set the sprite's position to (100,100) (that means the distance of the sprite's center point from the bottom left corner of the scene is (100, 100), right?), and observed the points returned by [sprite convertToWorldSpace:CGPointZero]
anchorPoint: (0, 0) point returned: (100, 100)
anchorPoint: (1, 0) point returned: (60, 100)
anchorPoint: (0, 1) point returned: (100, 70)
anchorPoint: (1, 1) point returned: (60, 70)
anchorPoint: (0.5, 0.5) point returned: (80, 85)
I can't find the logic in those coordinates. If I assume those coordinates are indeed relative to the bottom left corner of the scene, than (0,0) anchor point is actually top right, and (1,1) bottom left. Also, why isn't the center point (0.5, 0.5) returns the regular position I've set? Isn't the sprite's position relative to its center?
Help anybody???