hi dudes,
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; pimple*
float diffY = location.y>LastTouchPosition.y;
this below code is in loop:
cocos2d::CCSprite **target =**it;
cocos2d::CCPoint pp = target~~>getPosition;
target~~>setPosition(ccp(pp.x+diffX,pp.y+diffY));
please help me,
I am the beginner on cocos2d-x and c++.