2D rectangle circle collision

C15782fb84f803b0cd8e63d4f445220e
0
arctwelve 101 Sep 05, 2005 at 23:41

How can I test if a circle and a rectangle have collided? I need the penetration depth to move out of collision.

TIA

1 Reply

Please log in or register to post a reply.

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Sep 05, 2005 at 23:51

Dave Eberly’s site has great info about testing and calculating intersections:

http://www.geometrictools.com/Intersection.html

There’s some code for “Intersection of rectangles and circles” on that page.