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.

有帮助吗?

解决方案

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;

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top