Hey! I made a 2D game based on shooting. The problem is that the bullets fly through everything! I used this void
void OnTriggerEnter2D(Collider2D obj) { if (obj.gameObject.tag == "obstacle") { Destroy(this.gameObject); } }
But this not work D:
information:
Bullet is set on trigger
Obstacle is set on plain box collider
tag is correct
idk what i make wrong maybe i use wrong void or i wrong use this? Idk iam begginer in unity and c# if you wanna more information write thanks!
Active and usefull friends
@onlineight @ShadyProductions @xxnickiiixx @sarahnorthway