Summary

This chapter introduced the concept of using sensors and implemented two distinct senses—perspective and touch—for our AI character. The sensory system is one component of the whole decision-making system. We can use the sensory system in combination with a behavior system to execute certain behaviors for certain senses. For example, we can use an FSM to change to Chase and Attack states from the Patrol state once we have detected that there's an enemy within line of sight. We'll also cover how to apply behavior tree systems in Chapter 6, Behavior Trees.

In the next chapter, we'll be looking at popular pathfinding algorithms. We'll learn how to make our AI agent navigate complex environments using the ever-popular A* pathfinding algorithm, ...

Get Unity 2017 Game AI Programming - Third 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.