Jumping a sprite while moving in a Bezier action
- by marcg11
I'm creating a game and I need the sprite to jump (move up and down basically) while it's moving on a bezier path so it moves vertically while it still follows the path. If I do this while it's moving along the bezier path:
[mySprite runAction:[CCJumpBy actionWithDuration:0.1 position:ccp(0,0) height:10 jumps:1]];
It jumps vertically but instantly it returns to the position on the path. What I want is to jump relative to the path.
Anyone knows something about it?
It would looks something like this:
the curve is a sequence of CCBezierBy's by the way.
Thanks.