官术网_书友最值得收藏!

Fine-tuning gravity

Before we test out our new flying code, we need to make one adjustment. The default gravity setting of 9.8 feels too real. Pierre lives in a cartoon world; real-world gravity is a bit of a drag. We can adjust gravity in the GameScene class; add this line at the bottom of the didMove function:

// Set gravity 
self.physicsWorld.gravity = CGVector(dx: 0, dy: -5) 
主站蜘蛛池模板: 苍山县| 延安市| 墨江| 泸水县| 黄大仙区| 定远县| 拉萨市| 翁牛特旗| 三都| 肥城市| 德庆县| 柞水县| 司法| 五家渠市| 土默特左旗| 泌阳县| 比如县| 东城区| 西贡区| 大石桥市| 吴桥县| 穆棱市| 中阳县| 桃园市| 惠东县| 安塞县| 滕州市| 睢宁县| 康乐县| 化州市| 巢湖市| 定西市| 建水县| 济源市| 太白县| 陆川县| 平湖市| 图木舒克市| 报价| 商南县| 农安县|