Reader small image

You're reading from  Unity Artificial Intelligence Programming - Fifth Edition

Product typeBook
Published inMar 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781803238531
Edition5th Edition
Languages
Tools
Right arrow
Author (1)
Dr. Davide Aversa
Dr. Davide Aversa
author image
Dr. Davide Aversa

Dr. Davide Aversa holds a PhD in Artificial Intelligence (AI) and an MSc in AI and robotics from the University of Rome La Sapienza in Italy. He has a strong interest in AI for the development of interactive virtual agents and procedural content generation. He has served as a program committee member for video game-related conferences such as the IEEE conference on computational intelligence and games, and he also regularly participates in game-jam contests. He also writes a blog on game design and game development.
Read more about Dr. Davide Aversa

Right arrow

Basic sensory systems

An AI sensory system emulates senses such as sight, hearing, and even smell to get information from other GameObjects. In such a system, the NPCs need to examine the environment and check for such senses periodically based on their particular interest.

In a minimal sensory system, we have two principal elements: aspect (also called event emitters) and sense (also called event senses). Every sense can perceive only a specific aspect; for instance, an NPC with just the sense of hearing can only perceive the sound (one of the aspects) emitted by another GameObject, or a zombie NPC can use its sense of smell to prey on the player's brain. As in real life, we do not need a single sense for every NPC; they can have sight, smell, and touch all at once.

In our demo, we'll implement a base interface, called Sense, that we'll use to implement custom senses. In this chapter, we'll implement sight and touch senses. Sight is what we use to see the...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity Artificial Intelligence Programming - Fifth Edition
Published in: Mar 2022Publisher: PacktISBN-13: 9781803238531

Author (1)

author image
Dr. Davide Aversa

Dr. Davide Aversa holds a PhD in Artificial Intelligence (AI) and an MSc in AI and robotics from the University of Rome La Sapienza in Italy. He has a strong interest in AI for the development of interactive virtual agents and procedural content generation. He has served as a program committee member for video game-related conferences such as the IEEE conference on computational intelligence and games, and he also regularly participates in game-jam contests. He also writes a blog on game design and game development.
Read more about Dr. Davide Aversa