cocos2d convertToWorldSpace -
i'm not sure converttoworldspace works.
i have spritea parent.
i set position 40,40 example , add scene.
i have second spriteb set @ position 80,80.
i add spriteb spritea.
i print out position of spriteb: 80,80.
i print [self converttoworldspace:spriteb.position]. and, still 80,80. shouldn't spriteb position different here?
in case if want know position of spriteb in current world must call "converttoworldspace" methods parent (the spritea) :
[spritea converttoworldspace:spriteb.position];
the "converttoworldspace:" method applies node's transformation given position. should call methods parent's sprite.
Comments
Post a Comment