- Home /
Collision detection of certain ojects
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?
Answer by MangoDerp · Apr 28, 2012 at 01:53 PM
prefabs are instantiated with the name prefab(copy), so using
if(collision.gameobject.name == "prefab(copy)") should detect it.
Your answer
Follow this Question
Related Questions
How to detect a collision between two certain objects 0 Answers
How To: One collider for detection; one for collision. 1 Answer
Best practice for OnTriggerEnter detection 1 Answer
How to determine 2 objects at same space collision 1 Answer
Objects in my scene are not responding to OnCollisionEnter 0 Answers