Difference between BezierBy and BezierTo in Cocos2d?

cocos2d-android, cocos2d-iphone

Solution

CCMoveTo moves your node TO position. CCMoveBy moves your node for sone pixels. All ather actions are same. Example:

CCNode *a = [[CCNode alloc] init];
[a setPosition:CGPointMake(100, 100)]; //our node starts at point (100, 100)

now, if you'll move it TO CGPointMake(200,200), his positions will be (200, 200). But if you'll move it from (100, 100) BY CGPointMake(200,200), it will be (300, 300).

Problem

I Want to know the difference between the BezierBy and BezierTo. What will happen in the below code if say this is the scenario ``` CCBezierConfig bezier = new CCBezierConfig(); // Bezier curve bezier.controlPoint_1 = CGPoint.make(1002.0f,475.0f); bezier.controlPoint_2 = CGPoint.make(454.0f, 281.0f); bezier.endPosition = CGPoint.make(-20.0f,490.0f); CCBezierBy by = CCBezierBy.action(100, bezier); CCBezierTo to = CCBezierTo.action(2, bezier); CCCallFuncN actionMoveDone = CCCallFuncN.action(this,"spriteMoveFinished"); CCSequence actions = CCSequence.actions(by, actionMoveDone); obstacle1.runAction(actions); ``` Also have same issues in understand moveTo and moveBy Please help me with the concepts.

Original source