How To Avoid Particles Glitching Together In An Elastic Particle Collision Simulator?
Here is a short video in which can be seen that groups of two (maybe more) particles are glitched into each other. The source-code can be found here. And this is the code I use to
Solution 1:
The problem is your method of collision resolution doesn't ensure that the particles won't still intersect at the beginning of the next frame.
When you find a collision, you need to work backward to the point in time when collision between boundary of the particles happened and resolve the collision from there. Refer to this game development answer to a similar question for a method of doing that.
Post a Comment for "How To Avoid Particles Glitching Together In An Elastic Particle Collision Simulator?"