Ball with the new Sprite kit

前端 未结 2 996
深忆病人
深忆病人 2020-12-09 07:13

I\'m trying to make a simple forever bouncing ball with new sprite kit on ios 7. I set gravity:

 scene.physicsWorld.gravity=CGVectorMake(0, -9);
2条回答
  •  死守一世寂寞
    2020-12-09 07:19

    it's strange but if i set:

     ball.physicsBody.linearDamping=0.02f;
    

    It seems that ball don't change its bounce height.

提交回复
热议问题