How to create AI Characters

Standard first steps to use Character AI

1- Create a JU Character in Simple Setup

2- Disable Use Default Inputs and set tag to Enemy(or any other tag that is not "Player")

3- Add a JU Health component and JU Inventory

4- Bake a NavMesh

Your JU Character is now an NPC who can die and also keep items.

Ragdoll

A ragdoll setup is recommended for NPCs and Player to enable physics-based death reactions and precise hit detection, using the ragdoll’s colliders for accurate hit detection instead of the controller’s capsule collider. Click here to learn how to create a ragdoll.

Hit Box

To be able to deal damage by punches, make the Hitbox setup:

Adjust the size of the hit boxes the way that best fits your character

Zombie AI

The Zombie AI component makes the character walk to a destination or a Waypoint, follow the player and attack him with punches. Your character doesn't necessarily have to be a zombie, you can use this script to make an aggressive NPC for example.

As you can see in the GIF above, it only takes 3 clicks to setup a zombie enemy.

You can also adjust the parameters to better adapt to what you want

Patrol AI

The Patrol AI has an extremely similar setup to the Zombie AI, with the difference that it adds a Inventory to provide the ability to store items. You can add a weapon normally and the AI will start using it, and in the Item Equiping you can set the ID of the item it will equip by default.

You can create a Waypoint Path and assign it to the Patrol AI, and you will have a Patrol Enemy:

✅ Patrol AI configured successfully

Last updated