in the scene there are 2 cubes, one cube the a script on that move toward another cube and hits it. When the cube hits the other cube, both cubes needs to be destroyed. The script here below doesn't do job. Code (csharp): function OnTriggerEnter (other : Collider) { if(other.gameObject.tag == "bomb"){ Destroy(other.gameObject); Destroy(gameObject); } }
why in both cubes? I did it on one cube and added to moving cube rigid box with kinematic and that did the job.