문제

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