How to separate 2 colliding rectangles?

Monkey Forums/Monkey Programming/How to separate 2 colliding rectangles?

FelipeA(Posted 2013) [#1]
Hello everyone.
This is a problem I can't seem to find an easy solution to.
I been using flixel for almost all my games, which has a pretty nice collision system. I want to know if there is an easy way of handling this.

Thanks!


Skn3(Posted 2013) [#2]
How do you mean separate? As in if they are overlapping make it so they are not?


FelipeA(Posted 2013) [#3]
Yes, that exactly.


Shinkiro1(Posted 2013) [#4]
The topic you are looking for is called collision response.
There are some ways to do this:
http://www.metanetsoftware.com/technique/tutorialA.html
http://www.peroxide.dk/download/tutorials/tut10/pxdtut10.html