In my code sprite is moving, but when I click the mouse button then the cursor position goes to sprite origin.But that is not good. So I want to move the sprite where I click the mouse
from that position to sprite is move.
float diffX = location.x - pimple*
float diffY = location.y
this below code is in loop:
cocos2d::CCSprite **target =**it;
cocos2d::CCPoint pp = target~~>getPosition;
please help me,
I am the beginner on cocos2d-x and c++.