well there is a good and simple idea or algorithm if you want, you have to link a dummy cube or rectangle with the length u wannt it (like depth 5 meters for example), and it always moves with the actor and another one with the enemies ..
- then if the dummy boxes intersect or there is collision between them, that's mean that the ennemy has saw you so he can start shooting you..