I have a box collider on my enemy gameObject, used for colliding with terrain. Then I have a empty child object under the enemy called "Hitbox" with a box collider I want to use to detect bullets from the player. The "hitbox" collider has IsTrigger = enabled, whilst the terrain collider doesn't.
Using this code, the bullet only detects the terrain collider, whilst the bullets go through on the larger collider. For info, this is a top-down 2D game.
How do I make it so the bullet detects the child gameObject called "hitbox" instead of the box collider on the enemy parent object?
Thanks!