How to achieve uniform speed of movement in cocos 2d?
Posted
by
Andrey Chernukha
on Game Development
See other posts from Game Development
or by Andrey Chernukha
Published on 2012-04-09T11:41:48Z
Indexed on
2012/04/09
11:50 UTC
Read the original article
Hit count: 325
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?
© Game Development or respective owner