How can I make the I see the player better?

I’ve been making a first person shooter game using Unity. I recently released an alpha of the game to get feedback. One of the most reported problems is that the enemy can’t see you unless you’re right in front of them. I noticed this myself.

The problem is that they are using a raycast to see the player, and have a very narrow field of view, so I want to know, is there a better way to get the AI to see you without having the game take a big performance hit? I’m going to have a lot of enemies in my games, so performance is important for me.

I was thinking of using trigger colliders to spot the player, would that work, or is that too costly?

Well, you could use Vector3.sqrMagnitude between the position of the NPC and the Player and set a certain threshold, when the NPC will activate. If you really want to optimize that, you have to separate your map into a grid or use binning.