sprite kit - SWIFT: Moving each child node along line path separately -


i'm following tutorial: http://www.raywenderlich.com/80586/make-line-drawing-game-sprite-kit-swift#

all going except each 1 of 'pig' child nodes pig class move together; in when draw line 1 node nodes follow same path. if draw line node, follow one.

what i'm trying work out how make each pig node follow it's own path.

i've tried naming nodes 'pig1', 'pig2' etc, while 'touches begin' show node i'm touching, seems line path when created 1 pig applied , not each individual pig node.

i've contacted author no reply, appreciate advice, tutorial (can't find myself).

thanks

apologies, despite thinking following code correctly, stupidly made waypoints array (which held line coordinates) global var pig class instead of object (node) specific.

changed position of var declaration , good.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -