Chapter 4: Implementing Sensors
As we discussed in the previous chapter, a character AI system needs to be aware of its surrounding environment. For example, Non-Player Characters (NPCs) need to know where the obstacles are, the direction the player is looking, whether they are in the player's sight, and a lot more. The quality of the AI of our NPCs depends, for the most part, on the information they can get from the environment. Sensor mistakes are apparent to the player: we've all experienced playing a video game and laughing at an NPC that clearly should have seen us, or, on the other hand, been frustrated because an NPC spotted us from behind a wall.
Video game characters usually get the input information required by their underlying AI ...
Get Unity Artificial Intelligence Programming - Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.