Log in

View Full Version : C# collision detection


albear
Jan 12, 2009, 04:08 PM
OK I have my collision detection going but I'm not sure how to remove an object after it has collided with another.
I have
if (mozzieRectangle.Intersects(donutRectangle))
mozzieHit = true;

then later on

if (mozzieHit)
{
//remove balloon

}

my problem is I can't figure out how to get rid of the object.

realrustyspork
Jul 17, 2009, 11:24 AM
/*the name of the object you want to remove*/.Visible = false;

this will make it invisible, but not delete it. I hope that helps