A prototype to test a hitbox clash mechanic. Currently this mechanic only works with rectangles of the same size. Working on a solution to get this to work with rectangles of multiple sizes.
The main point was to find a midpoint along a line between the two boxes or the center of the new box created from the collision. For rectangles of the same size, the center of the new box does lie along the line drawn between the centers of the original two boxes.
If you happen to come across this repo and would like to play around with it, by all means go for it. I don't know how people usually do that stuff on GitHub. I think you just fork the repo or something or you can just download the code. No license for this project.