c# - Checking a rectangle collision with a circle -


i have 2 objects, rectangle object , circular shaped object. @ moment using 2 rectangles detect collision of these objects, , although working collision detectment not accurate enough because using rectangle means collision detected before circle has been hit.

my question method use in order detect collision circle collision detected when rectangle intersects circular object?

if you're using xna create boundingsphere circle , boundingbox rectangle, call sphere.intersects(box) check if collide.

see boundingsphere , boundingbox both have constructors fit 2d needs


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -