|
I could not find any info for detecting collision between two (or more) certain objects. For instance; detect if x collides y then destroy y how is it possible to write such code,I could not find any info for detecting collision between two (or more) certain objects. For instance; detect if x collides y then destroy y how is it possible to write such code edit------------------ i figured out some things about it, but now the question is how can i detect collision of instantiated prefab?
(comments are locked)
|
|
prefabs are instantiated with the name prefab(copy), so using if(collision.gameobject.name == "prefab(copy)") should detect it.
(comments are locked)
|
