+ 1
Why does one of the balls stop in space and just vibrate?
https://code.sololearn.com/WTfJ4ggI2J5B/?ref=app It doesnât happen often, but a ball will sometimes stop moving and just stay vibrating. Iâve noticed that this activity also makes the ball sticky and other balls get caught onto the one For the most part, the balls bounce off each other like they are supposed to. I just havenât been able to figure out the behavior yet. I think it may stem from the prototype function on line 100 that causes ball to ball collision, if anyone has any insight itâd be greatly appreciated.
3 RĂ©ponses
+ 1
This code is very long and would take a while to study but having delt with a similar problem a guess would be that theres somthing wrong with the values in between line 109 - 123;
+ 2
Is this what your looking for?
https://code.sololearn.com/Wat761UACSFu
I think what's happening is the balls collide and something get stuck on the edge of something and bounce back and forth very fast.
0
on the line no 55 if radius is 3 balls won't vibrate