(click to interact)
(mouseover/click to play GIF)
(click and drag to adjust rectangle size/position/rotation; distance to a circle is shown)
Suppose you have a rotated rectangle and a basic shape that rotation doesn't matter for (such as a point, circle, or a line segment), and you want to check whether the two are intersecting - be that for collision handling, hit testing, or whatever else.
On a glance this might seem like a bother because things are rarely too simple with rotated rectangles, but in this case it isn't - because you can "unrotate" the rectangle.
This small post is about that.
Continue reading