diff --git a/cocos/2d/CCMotionStreak.cpp b/cocos/2d/CCMotionStreak.cpp index 4c9138a131..5b6966889b 100644 --- a/cocos/2d/CCMotionStreak.cpp +++ b/cocos/2d/CCMotionStreak.cpp @@ -113,8 +113,10 @@ bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, const Co _stroke = stroke; _fadeDelta = 1.0f/fade; - - _maxPoints = (int)(fade*60.0f)+2; + + double fps = 1/Director::getInstance()->getAnimationInterval(); + _maxPoints = (int)(fade*fps)+2; + _nuPoints = 0; _pointState = (float *)malloc(sizeof(float) * _maxPoints); _pointVertexes = (Vec2*)malloc(sizeof(Vec2) * _maxPoints);