Here's the code I am using now:
For Local i : Int = 0 To Entity.Entities.Count() - 1
For Local j : Int = 0 To Entity.Entities.Count() - 1
If j = i Or Not Entity(Entity.Entities.ValueAtIndex(i)).IsPhyicsEnabled Or Not Entity(Entity.Entities.ValueAtIndex(j)).IsPhyicsEnabled
Continue
EndIf
Local a : Entity = Entity(Entity.Entities.ValueAtIndex(i));
Local b : Entity = Entity(Entity.Entities.ValueAtIndex(j));
Local dist : Float = Sqr(((a.Position.X - b.Position.X)^2) + ((a.Position.Y - b.Position.Y)^2))
If dist < Min(a.Radius, b.Radius)
a.Collide(b)
EndIf
Next
Next
The trouble with this is the looping. Checks are done way too many times. Is there a way I can cut this down?