Ask Experts Questions for FREE Help !
Ask
    albear's Avatar
    albear Posts: 1,594, Reputation: 222
    Ultra Member
     
    #1

    Jan 12, 2009, 04:08 PM
    C# collision detection
    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's Avatar
    realrustyspork Posts: 1, Reputation: 1
    New Member
     
    #2

    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

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search


Check out some similar questions!

Who is at fault, head on collision. [ 14 Answers ]

I am at a loss and in total shock this week. Need direction and your opinion. We, out of the blue were hit head on. On Sunday we were driving home from a ballet recital. We being Me, my DH and 2 small children. We were in a Toyota van. DH and I were talking about the evening with the kids...

Bug Collision [ 1 Answers ]

If a bug is hovering in the air, v=0, and bangs into a car going 20 m/s. The collision is perfectly elastic, and the car continues without any change in velocity after the collision. What is the bug's speed?

I was involved in a collision [ 4 Answers ]

I was involved in a motor vehicle accident (MVA) back in Sep 07. I fractured C2 and was flown to hospital by helicopter. I was released 24 hrs latter and was treated non-surgically with a Miami-J collar. I was in collar for 5 months and lost 7 weeks from work. I am out of collar now and driving...

Inelastic Collision .very good one [ 3 Answers ]

A is a fixed point at a height H above a perfectly inelastic smooth horizontal plane. A light inextensible string of length L (>H) has one end attached to A and other end to a heavy particle. The particle is held at the level of A with string just taut and released from rest. Find the height of the...

Collision detection circuitry in the IEEE 802.3 network cards [ 2 Answers ]

I need to find out whether the Collision detection circuitry in the IEEE 802.3 network cards is either analogue or digital. An explanation of whatever the answer is would help.


View more questions Search