How to achieve uniform speed of movement in cocos 2d?
- by Andrey Chernukha
I'm an absolute beginner in cocos2 , actually i started dealing with it yesterday. What i'm trying to do is moving an image along Bezier curve. This is how i do it
- (void)startFly
{
[self runAction:[CCSequence actions:
[CCBezierBy actionWithDuration:timeFlying bezier:[self getPathWithDirection:currentDirection]],
[CCCallFuncN actionWithTarget:self selector:@selector(endFly)],
nil]];
}
My issue is that the image moves not uniformly. In the beginning it's moving slowly and then it accelerates gradually and at the end it's moving really fast. What should i do to get rid of this acceleration?