Lets Build Community

Lets Build is a community of 163 amazing members

We're a place where indie game developers to connect with one another to share ideas, ask for help and teach each other.

Create new account Log in
loading...

Make Easy Enemy AI | Finite State Machine in Unity

eranelbaz profile image eranelbaz ・1 min read

In this video I'll teach you how you can create Enemy AI for your game using Unity Animtor to create a Finite State Machine,
We will make a basic AI that will patrol the scene and if it will detect our survivor the AI will change State and will start to chase us

Enjoy this Enemy AI / Finite State Machine tutorial!

Like this post?
Consider Support me via Patreon
Or Subscribe to my YouTube Channel
You can also follow me on Twitter

Discussion

pic
Editor guide
Collapse
rcarlson profile image
Robert Carlson

Your editing has improved a ton! The transitions are a nice touch, especially with that sound effect :) Did you hire an editor? JK :)

Does the chase sequence end if the player manages to exit the triangle? It looks like the tank gives up a couple times but I couldn't tell why.

Collapse
cpluta profile image
Chris Pluta

I'm definitely of a fan of the zooming into the area to focus in on.

Collapse
eranelbaz profile image
eranelbaz Author

Thanks! practice makes perfect :) took all the comments you guys told me and tried my best

The tank is giving up after 5 seconds as I programmed it, I didn't want to do anything special because I made one for the patrol and thought it was too much and the concept is repeated

Collapse
cpluta profile image
Chris Pluta

Looks awesome! Seeing the title I thought you might have tried to do it with the nav mesh agent.

I really appreciate working to keep the code easy to read as well. 😁

Collapse
eranelbaz profile image
eranelbaz Author

Thank you!
maybe next time ill do nav mash