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

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -