First its good to note the difference between Colliders and Triggers
Colliders - generally are intended to represent physics interactions, so objects "colliding with them" should not pass through one another. As opposed to...
*Triggers* - as the name implies, "fire" off an event but don't carry the typical physics body interactions
Triggers and colliders also send different events upon interaction, and the same can be said as well for 2D and 3D objects
OnTriggerEnter: 3D | 2D
OnCollisionEnter: 3D | 2D
Knowing this there are a few ways to approach this problem. First like you suggested you could add a second collider to the enemy, and from that new Collider's Component Inspector on the enemy check the isTrigger
box marking it as a "Trigger".
That will allow it to instead respond to the OnTriggerEnter
Method (if it is a 2D Collider OnTriggerEnter2D
)
You could also organize your Enemy GameObject with a hierarchical structure
Enemy Game Object Parent
- Damage Collider Object Child
- Sight Radius Object Child
and then adjust the organization of your scripts to only have the kill script on the collider which should kill the player. This way you could use Triggers or Regular colliders.