- A Unity project for NPC (non player characters) AI.
- Download or clone project, then open in Unity.
- This project uses the free edition of Panda Behavior Trees. The project will not run without this asset installed.
This AI will direct NPCs to run and hide behind obstacles from the player. When enough NPCs have gathered together, they will stop running and attack the player.
- A surface object must contains a Navmesh.
- Each NPC is a Navmesh Agent.
- The perimeter vectors from the Navmesh are extracted and examined as possible cover points for NPCs.
- NPCs that are distant from the Player will be ignored
- NPCs will keep a safe distance from the player.
- The number of NPCs gathered together will determine whether they continue to flee or turn and fight.
- Attacking NPCs will lose interest when they get too far away.
- Once attacking, any NPCs in range will join the fight.
-
Sam Matthews - Initial work - smatthews1999
-
See also the list of contributors who participated in this project.
- This project is licensed under the MIT License
- Special thanks to Stagpoint Developer Tools for the integral Navmesh functions necessary for building this project.