-2

I would like to have an SKSpriteNode start to fall when the screen is not being tapped(like in flappy bird). I have SKActions that move the object up which are called in the touchesBegan method and I would like the object to fall until the next tap or it hits the ground.

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
Dan Grueneberg
  • 215
  • 1
  • 4
  • 9
  • 2
    Either use physics or move your sprite down each scene update. You should also show some work, what have you tried, what didn't work, not just expect someone to copy flappy bird for you... – Dobroćudni Tapir Feb 15 '14 at 19:39

1 Answers1

1

trying setting your gravity in the game to self.physicsWorld.gravity = CGVectorMake(0,-9.8); and setting your SKSpriteNode to dynamic.

test.physicsbody.dynamic = YES;

ObjectiveCsam
  • 204
  • 1
  • 8