≡ Menu

Three Simple AI Behaviors v0.2

Almost a year and a half ago, I wrote up a small Unity3D project that demonstrated a few basic AI behaviors (patrolling, wandering, following). You can check it out here. I get more emails and questions about that simple project than anything else on this website – I guess simple projects that demonstrate the basics of game AI are something people are interested in!

Anyway, this project had a major problem – the sample NPCs didn’t deal with changes in terrain height well (or at all). This has been bugging me for a while, but I haven’t had a chance to fix it until tonight. Check out the project page for a new version, complete with NPCs that don’t burrow into the ground at the first sign of a change in the y-value of the terrain underneath their feet.

{ 5 comments… add one }

  • Ishara March 19, 2012, 3:49 am

    Thank you very much :)
    sorry for bugging you 😀

  • dee April 15, 2012, 8:28 am

    steve the best….:D

  • John-Luke May 26, 2012, 12:07 am

    Thanks a lot for sharing these! You have no idea how helpful they are. :)

  • jez August 21, 2013, 8:15 am

    I cannot get it to work atall. When i import this project into Unity nothing shows up.

    I have tried to just take out the AI scripts and use them in a different project but i still get the zombie flying up into the sky and ignoring the hills.

    I know you have already done alot but just extracting the AI from the project and saying how to add it to another project would be great.
    I get errors about missing behaviours.
    Also maybe it is because i am using a mac and i see an exe in the project which is not going to work.



    • M. Waqas Khan May 10, 2015, 12:31 pm

      These AI works great. I have personally used in our Unity FPS project. Its awesome. Our project’s stuff will be available after completing the project on our blog as http://ozathegame.blogspot.com/ . Our game story is based on the ongoing Pakistani Military Operation in North Waziristan Agency.
      Some suggestions for you: Add a character controller to your zombies. then adjust its center above the terrain or plan.

Leave a Comment

Next post:

Previous post: