Is there any way an object can pass through another object that has a rigidbody and collider attached?

Basically I have a bullet thats meant to hit an enemy and take away points from their health. It works. BUT . The enemies have a vision cone attached directly in front of them(Im making a Stealth game). So when the bullet shoots it hits the cone and just stays still. The vision cone has a rigidbody and a boxcollider attached to it and is used for detecting the player. If I disable the collider the bullet can pass through but the enemy cant detect the player.

So is there a way I can have the bullet pass through the vision cone despite having a collider and rigidbody attached?



make the vision cone a trigger (is Trigger checked) and your bullets will pass though it.

Put the cone and bullets on different layers, then make sure those layers cannot interact with each other.