4

I have two balls of equal mass that hit each other straight on. I can't seem to figure out why there is a rebound effect on the incoming ball. I am using sprite kit.

I thought it was the restitution property. I have it set to 1 (which is what I thought it should be), but have tried many.

The only way I can kill the rebound is to change the mass, which messes up other things.

If the speed is slow it pretty much stops as it should. But at higher speeds there is a bounce back. They should just exchange velocity as it is a head on collision. Is it possibly some numerical rounding at high speeds or something?

http://h2physics.org/?cat=4

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Cherr Skees
  • 1,508
  • 2
  • 21
  • 37
  • I'm not sure that sprite kit is designed to be a perfect physics simulator... just close enough. – Damien Black Jan 07 '14 at 02:41
  • Fair enough... just wanted to make sure that I wasn't missing something. – Cherr Skees Jan 07 '14 at 02:56
  • Just want to make sure I understand... 1) One ball is stationary, and one is not. 2) Both balls have the `restitution` property set to 1.0. 3) The ball that's moving does not come to a full stop after the collision. – godel9 Jan 07 '14 at 03:53
  • Yes, that is the case when the velocity is high. – Cherr Skees Jan 07 '14 at 05:36

1 Answers1

6

actually restitution 0 should disable any bouncing effect, 1 means the body leaves the surface with the same velocity it impacted with

CodeSmile
  • 64,284
  • 20
  • 132
  • 217