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.
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
5 People are following this question.
Raycast & AI problem.
2D enemy Field of Vision script
Find number of objects between two points
Multiple Cars not working
AI raycasting problem