4
votes

I have set up my scene to contain an edge loop and a ball shaped object which is supposed to drop down and then bounce around until all its energy is gone. However I can't seem to get the physics in SpriteKit to minimize restitution. The ball always drops and bounces back up only a few pixels.

My parameters are:

  • world gravity = -4f
  • body of the ball = circular with radius half the width of the frame
  • restitution = 0f
  • friction = 0f

I tweaked already gravity, mass of the ball and all other properties. My last idea is to apply a force to the ball as soon as it hits one of the borders but that just feels wrong. I should be able to simulate a bouncing ball.

1

1 Answers

5
votes

Stupid me. Restitution of 0 means: no bounciness at all. A value of "1" indicates "super bouncy".