How do I make a node move in sprite kit swift -


i have been wondering how long time using sprite kit swift, problem don't know how make node move skactions basicly when go on scene put on see node moving (name node sprite) ,i not understand how works can please show me explained example on how this, thank in advance!

to move sprite in sprite-kit can use skactions.

for example:

let action = skaction.movebyx(3, y: 2, duration: 10) 
  • this make sprite move 3 units along x-axis , 2 units along y axis in 10 seconds.

if want sprite move specific place, can do:

let action2 = skaction.moveto(location: cgpoint, duration: nstimeinterval) 

hope helped!


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -