Moving a sprite (SpriteKit) along a UIBezierPath in steps -
i able generate uibezierpath use skaction.followpath in order make sprite follow path after calling runaction. this, can make sprite follow bezier path start of path endpoint.
however, i'm going following:
- generate fixed path, such uibezierpath
- this path have 10 points along it
- using button press, move sprite (currently on starting point along path) 1 "move" along next point.
- using button presses, i'll continuously move sprite along fixed path in 10 discrete steps
probably similar example i'm trying achieve candy crush level map. in this, have curvy path along there points move character along in discrete steps.
thank help!
instead of using bezier path why not store points in array. each time touch button pop off end of array , skaction.moveto(yourpoint)
Comments
Post a Comment