我正在构建一个2D游戏,我正在寻找一个特定顺时针曲线的节点,从天空到地面(就像一只鸟会俯冲到地面)以顺时针方向运动,并产生一些摩擦力鸟类降落的影响。
我一直在玩'physicsBody',但我似乎无法获得正确的曲线,任何人都可以帮助......这是我想要实现的曲线图。 http://www.theluxuryteam.com/uploads/shared/images/curved_arrow-black.png
谢谢
func addCrow() {
var crow = SKSpriteNode(imageNamed: "crow")
crow.physicsBody = SKPhysicsBody(rectangleOfSize: crow.size)
crow.physicsBody?.dynamic = true
crow.physicsBody?.collisionBitMask = 0
crow.physicsBody?.velocity = CGVector(dx: -200, dy: 0)
crow.physicsBody?.angularVelocity = 100
crow.physicsBody?.linearDamping = 0
crow.physicsBody?.angularDamping = 100
var random : CGFloat = CGFloat(arc4random_uniform(300))
crow.position = CGPoint(x: self.frame.size.width / 1.4, y: self.frame.size.height / 1.2 ) // 1.4 0.8
self.addChild(crow)
}