Reputation: 553
I use CCParallaxNode from cocos2d framework for automatization scrolling. First node is CCSprite, but second node is big layer in wich I draw with ES Open GL. When user touches I have to change something in second layer subject to coordinates of touch. I catch touches in parent of CParaxNode, and I get coordinates from 0 to width of screen. How can I transform this coordinates to layer coordinates?
Upvotes: 0
Views: 183
Reputation: 307
you can try this:
[myParallaxNode convertTouchToNodeSpace:myTouch];
or else:
CCNode *insideLayer = [myParallaxNode getChildByTag:kMyLayerTag];
[insideLayer convertTouchToNodeSpace:myTouch];
hope it helps..
Upvotes: 1