Best way to ignore y component for certain collisions?

I have a sort of top-down shooter game I’m working on, so for the bullets’ collision I only want to check for x and z positions and ignore the y. An obvious way to do this would be to make all the colliders really tall so they will always hit regardless of y, but I also need to use those colliders for physics collisions.

You can add another child game object to you existing game object. And add a collider into new child object. And mark the new collider as IsTrigger. And use IsTriggerEnter() to detect the bullet collision. By using IsTriger your new child game objects will not be able to collide physically with other collider