Particle collisions, an array question
in
Programming Questions
•
2 years ago
hey, i'm new here and i've only been using processing for a bit so i'm not super good but I managed to whip up this particle simulation:
http://www.openprocessing.org/visuals/?visualID=26187
As you can see there is no collision checking implemented as of now but I would like to get some help on how I would check that i'm not doing collision calculations on a particle to it's self. How do I check this in an array? Also any help/tips relating to springy collisions would be appreciated as i'm planning to make a pseudo fluid with repulsion and attraction forces.
Thanks!
edit: btw "oloc" was going to be old location but i didn't need that for what i was doing.
2