ZhouWeikuan / cocos2d

cocos2d for android, based on cocos2d-android-0.82, and now ported from cocos2d-iphone 0.99.4. The googlecode address is here: http://code.google.com/p/cocos2d-android-1/ . There are several demos to watch.
610 stars 291 forks source link

Fixed a bug with CCBezierTo #16

Closed dustinanon closed 13 years ago

dustinanon commented 13 years ago

If you repeat a CCBezierTo action, then the CCBezierConfig.endPoint is continually distorted from repeatedly subtracting target.getPosition() from config.endPoint.

The solution was to copy the CCBezierConfig into a new variable which is unaltered. This way you calculate the relative endPoints based on the original endPoint, not the previous relative endPoint.