SDL Ball Physics WIP
Uploader Comments (oopolka)
Top Comments
-
Really nice. You need more collision iterations though to stop the overlapping
All Comments (26)
-
How do you calculate the velocity when 2 objects collide?
-
Really cool! Cool enough to make a tutorial?
-
Really really impressive. Great job! Can we see the SC? I'm just starting out and would love to see how you made this. Thx!
-
Your balls have the fall-through disease...
-
Awesome.
-
i see you like balls :) nah nut awesome physics! I like it
-
Nice, I'm starting at SDL by these days, still don't know how to make collisions with dynamic objects, just pre-defined ones. But it's really interesting how this works, you can use basic Physics to do these things... I guess that if I add mass and momentum to my objects this idea will come to me... :)
-
omg... too amazing...
-
@EmbraceTheThunder actually, increase ball B's speed a little LESS than the amount lost. =P
not to be picky or anything...
=P
Looking good. Those are some really bouncy balls though.
.
Here's a tip to make it look more realistic:
When the ball hits an obj, rather than just changing the direction of the velocity, change the speed as well.
When an object in real life hits another object, some of the energy is transferred, causing the falling object to lose speed.
.
in other words:
When ball A hits a wall, reduce ball A's speed.
When ball A hits ball B, reduce ball A's speed and increase ball B's speed by the amount lost.
EmbraceTheThunder 1 year ago
@EmbraceTheThunder This is what happens in the simulation.
oopolka 1 year ago 15