Hi, i am new to cocos2dx programming........
I am trying to make a projectile motion of a target sprite
// in addtarget() part
int i(0);
while(i<20)
{
p=HelloWorld::nextPoint(p,0.5);//p is a struct see below.
cocos2d::CCFiniteTimeAction* actionMove=cocos2d::CCMoveTo::actionWithDuration(1.0, ccp(p.x,p.y));
target->runAction( cocos2d::CCSequence::actions(actionMove,NULL));
++i;
}
cocos2d::CCFiniteTimeAction* actionMoveDone = cocos2d::CCCallFuncN::actionWithTarget( this,callfuncN_selector(HelloWorld::spriteMoveFinished));
target->runAction( cocos2d::CCSequence::actions(actionMoveDone, NULL) );
nextPoint is a function which returns struct p(which have time,velocity and space coordinates t,x,y,vx,vy) When outside the loop, it runs all fine but when inside it doesn't show anything debugging done and all cordinates are fine Tried removing NUll can't do Finally using bezier so now it works partially. But unable to understand why CCMoveTo doesn't work. it always showed initial coordinates of (60,60) & also some good tutorial link for cocos 2dx for people who r new to mobile game programming. Thanks!