Unity Artificial Intelligence Programming - Fourth Edition
by Dr. Davide Aversa, Aung Sithu Kyaw, Clifford Peters
Implementing Sensors
As we discussed earlier, a character AI system needs to be aware of its surrounding environment: for example, NPCs need to know where the obstacles are, where the player is looking, if they are in the player's sight, and a lot more. The quality of the artificial intelligence of our NPCs depends, for the most part, on the information they can get from the environment. Based on that information, the AI-powered characters can decide on which action to execute. If there's not enough information, characters might show unusual behaviors, such as choosing the wrong places to take cover, idling, or looping in strange actions without knowing how to proceed. A quick search for AI glitches on YouTube opens the door to a huge collection ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access