我正在尝试将两个节点与一个固定的 SKPhysicsJoint 绑定在一起我想出了这个代码:
var anchor = CGPointMake(hero.position.x + 10,hero.position.y)
var fixedJoint = [SKPhysicsJointFixed .jointWithBodyA(hero.physicsBody!, bodyB: shield.physicsBody!, anchor: anchor)]
问题来了:
self.physicsWorld.addJoint(fixedJoint)
它给了我这个错误:
Cannot convert value of type '[SKPhysicsJointFixed]' to expected argument type 'SKPhysicsJoint'
任何帮助表示赞赏。