How to get location of sprite placed on rotating circle in cocos2d android?

Posted by Real_steel4819 on Game Development See other posts from Game Development or by Real_steel4819
Published on 2014-06-13T11:53:20Z Indexed on 2014/06/13 15:44 UTC
Read the original article Hit count: 274

Filed under:
|

I am developing a game using cocos2d and i got stuck here when finding location of sprite placed on rotating circle on background, so that when i hit at certain position on circle its not getting hit at wanted position,but its going away from it and placing target there.I tried printing the position of hit on spriteMoveFinished() and ccTouchesEnded(). Its giving initial position and not rotated position.

CGPoint location = CCDirector.sharedDirector().convertToGL(CGPoint.ccp(event.getX(), event.getY()));

This is what i am using to get location.

© Game Development or respective owner

Related posts about android

Related posts about cocos2d