Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

perfectly elastic collisions in sprite kit

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

like image 896
Cherr Skees Avatar asked Sep 19 '25 07:09

Cherr Skees


1 Answers

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

like image 120
LearnCocos2D Avatar answered Sep 21 '25 23:09

LearnCocos2D