So I've been bouncing ideas around on how to easily achieve (box <> box) collisions with slidey reactions. Think 2D RTS units on a map swarming together, thought its not for an RTS.
I used an AABB method to detect an overlap between boxes and go a little further to detected which sides are overlapping and the direction to travel so only leading sides are checked - putting all that together results in;
Not perfect, as you can see chain reactions happen that push boxes away.
I am starting to think I need a different method to achieve this, some googling have turned up a few ideas though they all seem overly complicated.
Any one point me a good direction?
|