I tried to get real coordinates (like on iPad screen) for all elements on active scene using
CCARRAY_FOREACH(node->getChildren(), obj)
for each Node I tried
CCPoint realCoordinates = node->getParent()->convertToWorldSpace(node->getPosition());
or this
CCPoint realCoordinates = node->convertToWorldSpace(node->getPosition());
or
CCPoint realCoordinates = node->convertToWorldSpaceAR(CCPointZero);
In result: For some node from my elements tree I have wrong coordinates.
Element tree is big in deep nested with anchors.
May be somthing can help me how can I calculate valid absolute (1024х768) screen coordinates for all elements from my CCNode tree.
Thanks
obj->getParent()->convertToNodeSpace(obj->getPosition())rather thannode->getParent()->convertToWorldSpace()- Nadariannode->getParent()->convertToWorldSpace(node->getPosition())should work. It does for me. - Guy KogusCCDirector::sharedDirector()->convertToUI(realCoordinates)to get it in screen coordinates? - Guy Kogus