How should I go about implementing my AI-s field of vision? Raycasts? Something else?
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.
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?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
6 People are following this question.
Multiple Cars not working
Raycast & AI problem.
2D enemy Field of Vision script
Find number of objects between two points
AI raycasting problem