- Home /
Enemy Line of Sight
What exactly is the best way I should go about implementing a Line of Sight feature for these enemies I'm creating? I'm currently using raycasting which seems like the ideal way to do it though I'm only using one raycast so basically the enemy can only see the player when looking in their exact direction which of course isn't what I want.
So should I be using multiple raycasts or is there another way I should be doing this?
Answer by IndievdB · Sep 20, 2017 at 02:55 AM
You probably want a vision cone / field of view for your enemy. I think the implementation here should work fine:
http://answers.unity3d.com/questions/41759/creating-enemy-field-of-vision.html
There are also a video tutorials that I haven't watched, but seem good:
Your answer
Follow this Question
Related Questions
AI Field of vision 1 Answer
AI passes through walls and flies 2 Answers
Another Raycast Issue. 0 Answers
My Eneny AI Script Wont Work? 2 Answers
What am I doing wrong with my AI? 1 Answer