ios - How to slow down CCMoveTo? -
i have ccmoveto
action on sprite, moving 1 point another. when user hits button sprite should slow down ease , continue moving target location new speed. have no clue how make happen.
update. replaced ccmoveto
ccmoveby
question still same.
with current implementation of cceasein/cceaseout
actions, can ease rate of actions , zero. means if ease ccmoveby/ccmoveto
ease movement speed from/to standstill.
however, starting cocos2d 2.1 ccmoveby/ccmoveto
stackable. feature can implement workaround results in effect want.
setup , simulataneously run 2 ccmoveby
actions sprite: actiona
have slower movement speed after button press. actionb
have speed corresponding difference of faster speed , slower speed.
then, when user presses button, can cceeaseout
actionb
(stop ccmoveby
, , launch again desired cceaseout
). sprite eases movement speed of actiona + actionb
speed of actiona
.
despite explanation, if implementing game controls want precisely fine tune, might better idea avoid ccactions
, update sprite position frame-by-frame implementing custom movement code.
Comments
Post a Comment