Jumping a sprite while moving in a Bezier action
Posted
by
marcg11
on Game Development
See other posts from Game Development
or by marcg11
Published on 2012-03-19T20:11:25Z
Indexed on
2012/03/20
5:40 UTC
Read the original article
Hit count: 284
cocos2d-iphone
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.
© Game Development or respective owner