I've been implementing an AI system in my 2D game using MonoGame.
In some situations when a collision between two objects occurs, I need the NPC to move in different directions depending on the direction of the collision. With the simple Rectangle.Intersects
method I can't handle this, because it only detects if two rectangles intersect and doesn't tell me how they intersect.
Basically I need to know if the top of the NPC rectangle collides with the bottom of a tile rectangle, and so on.
This question talks about something similar but I don't think there is CollisionDetection2D.BoundingRectangle
in MonoGame.