Question

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.

Was it helpful?

Solution

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;

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top