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*~~>LastTouchPosition.x;
float diffY = location.y~~ pimple*~~>LastTouchPosition.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++.