I am doing as below with CCSpirit object as below
id actionMove2 = [CCMoveTo actionWithDuration:4 position:ccp(40, 520)];
id actionMoveDone2 = [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)];
[Sobject runAction:[CCSequence actions:actionMove2, actionMoveDone2, nil]];
where Sobject is an CCSpirite on object in cocos2d,
but now I want to move the same object in zigzag format to upside, how can I do that?
If you want to move your sprite along the polyline then just combine CCMoveTo actions into sequence.
If you want some smooth trajectory – combine CCBezierTo into sequence.
If you want some complex custom move create a CCSprite subclass and add some method as
Then schedule it and make in this method any transformation you want