plain problem with collider. begginer in unity

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, move in bullet and player is same

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

It is because of the speed of your bullet…

Your bullet go so fast that unity have some trouble to calculate the OnTrigger or OnCollision event!

The easiest way to fix that is to use rb2D.AddForce and not rb2D.velocity or transform.Translate(transform.right * speed).

With that, you have to find the perfect force speed so the trigger/collider can be detected by unity.

Hope it helps…

Releasing the bullet does nothing. Could you show me how to use rb2D.AddForce to make my object move? @Artik2442

Yes the bullet release didn’t helped me even a bit. Now its getting a bit frustrated upsers