Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

When two objects to collide I want one to disappear

Discussion in 'Scripting' started by Kala, May 21, 2009.

  1. Kala

    Kala

    Joined:
    May 21, 2009
    Posts:
    2
    Hello,
    So basically I want one object to disappear or destroy when it hits another object. The object that it is hitting is stationary...it is a base...


    How can I do this???

    Thanks!
     
  2. ryanzec

    ryanzec

    Joined:
    Jun 10, 2008
    Posts:
    696
    if you call

    Destroy(object)

    where object is the object you want to destroy.