Reacting to rectangle on rectangle collisions
- by mcjohnalds45
I don't know how to react to collisions between two axis aligned rectangles that have x, y, width and height values (x and y are from the centre of the box) to make them simply not overlap.
I figured I'd just make them move away from each other depending on how far they intersect in the opposite direction (left, right, up or down) of where they…