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:

  1. generate fixed path, such uibezierpath
  2. this path have 10 points along it
  3. using button press, move sprite (currently on starting point along path) 1 "move" along next point.
  4. 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!

world map

instead of using bezier path why not store points in array. each time touch button pop off end of array , skaction.moveto(yourpoint)


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -