Perception System Explained

Here is a bit explanation how the perception system code works.

Basic features of the code is as follows

  • If the player object is behind some other object, it is not seen. This is tested with Physics.Linecast from the center of perceiving object to the center of the player object.
  • If player object is really near (distance < closeRange), the player object is noticed 360 arc.
  • If the player object is fron (angle between the forward vector of perceiving game object and the player object is less than front angle) and distance is less than frontDistance, the player object is seen.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s