Instantiated Bullet(IsTrigger + Box Collider) Is Not Colliding With Other Colliders

Keep in mind I am still pretty new to Unity. The enemy instantiates the bullets at the player, but the bullet goes through walls and I am trying to fix it. It has been a few days and I can’t find a solution anywhere. The bullet has a box collider set to istrigger and the level is made up of a bunch of convex mesh colliders, which I have heard interact with triggers. Both the bullet and level have rigidbodies. Please ask for any more info if needed.

This code is attached to the bullet and the level is set to tag “Wall”
I have more code in the function but it is not relevant.

public void OnTriggerEnter(Collider other)
    {
         if (other.gameObject.tag == "Wall")
        {
            Debug.Log("col");

            Destroy(gameObject);
        }
    }

Any help is greatly appreciated.

What’s the code you’re using to move them?

    public float bulletSpeed;
 

void Start()
    {
        rb.AddForce(transform.forward * bulletSpeed, ForceMode.Impulse);

    }

This is in the same script as before.

Umm… so I think I got it working. The problem was that the rigidbody I reference came from the prefab and not the instantiated bullet.

Sorry for taking your time… :sweat_smile: