- Home /
AI Field of vision
How should I go about implementing my AI-s field of vision? Raycasts? Something else?
EDIT
Here is a better explaination. how can I find out what it can see. When it looks to one side, than it cannot look to the other.
-------N----------- --------SSSSN------ ----N-|-S--->--N--- ---------SS-N------S is what it can see, N is what it cannot see, | is wall, > is enemy facing left, - is just void.
Answer by dkNinja · Apr 12, 2012 at 08:35 PM
Raycasts are kind of slow and dependent on raycast resolution. You might want to look at using a few box triggers to detect what is in the field of vision and then do raycasts for checking occlusion.
Thanks! Sorry it took too long, I forgot I had this question up, cause I haven't been to my AI code since posting this question.
can you tell me how to set up a box trigger to detect the field of vision?
Your answer
Follow this Question
Related Questions
2D enemy Field of Vision script 1 Answer
Multiple Cars not working 1 Answer
Best way to do an AI 1 Answer
AI Pathfinding using RayCast 0 Answers
Another Raycast Issue. 0 Answers