Question by
eni_cay · Jul 30, 2019 at 12:53 AM ·
destroycollider2dcollision2ddestroy objectdestroygameobject
2D sprite won't destroy on collision
i tried variety of ways but i cant seem to be getting a result , basically i want to destroy a 2d ball when it touches another object void OnTriggerEnter2D(Collider2D coll) { if (coll.gameObject.name == "ball") { Destroy(coll.gameObject); }
} on 3d it works fine but in 2d it doesn't work any idea ? (of course in 3d i have to remove the 2D from oncollision and collision2D or Collider2D)
Comment
Your answer
Follow this Question
Related Questions
Destroy GameObject after certain amount is reached? 1 Answer
Bullets not destroying enemies 0 Answers
reset destroyed collider after game restart 1 Answer
Create new transform when other transfrm is destroyes 1 Answer
Objects getting destroyed in unity test, but only sometimes in the phone app 0 Answers