łatwy problem dla początkujących z kolizjami.

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

make sure bullet has a collider of type trigger, and obstacle has collider.
Add some logging to see if the trigger works:

private void OnTriggerEnter2D(Collider2D obj) 
{ 
    if (obj.gameObject.tag == "obstacle") 
    { 
        Debug.Log("We collided with: " + obj.gameObject.name);
        Destroy(this.gameObject); 
    }
    else
    {
        Debug.Log("We did not collide with obstacle but with: " + obj.gameObject.name);
    }
}

Also it can depend on how this object moves, does it use Rigidbody velocity movement or vector translate movement. Physics does not register collisions if they come from Translate movement. They must come from rigidbody based movement.