be warned while using this! this algorithm's runtime is O(n^2), what this means is that the time it will take to run will be proportional to the amount of units times the amount of units: if you have 4 units, it will take 4x4=16 time to complete, but if you have 5 units, it will take 5x5=25 time to complete. the difference is 25-16=9, a considerably large difference between 4 and 5 units, and with 100 units, it would take 100x100=10000 time to complete. this can be sped up by splitting the map up into many sections and checking collisions within those sections, because there is no reason for checking collisions between units that are in two completely separate areas of the map. this would reduce the runtime by only having to check all of the units within a certain area against all the units in a certain area, as apposed to checking all units on the map against all units on the map. click see inside click to move one of the circles, the circle will push its way through other circles it is possible that if a collision is too large, then units will be pushed out of a collision and into another one, this can be resolved by running the resolve collision code a certain amount of times.