Jump to content


- - - - -

2D rectangle circle collision


1 reply to this topic

#1 arctwelve

    New Member

  • Members
  • Pip
  • 4 posts

Posted 05 September 2005 - 11:41 PM

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

TIA

#2 Dia

    DevMaster Staff

  • Administrators
  • 1089 posts

Posted 05 September 2005 - 11:51 PM

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

http://www.geometric...tersection.html

There's some code for "Intersection of rectangles and circles" on that page.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users