Player & NPC Behaviour AI Framework: NavMesh, Blend Tree, State Machine
A NavMesh-driven NPC AI and Player controller kit for 3D games, ready for your own models and animations
by Rulnarite
Price History +
Save time on your Player movement and NPC state-machine behaviour setup! This is a
NavMesh-driven NPC behaviour system and a player controller framework ready to drop
into your 3D action game and drive your own animations.
NPC behaviour runs as a visual Animator state machine. Wander, Chase, and Attack are
built as states you can see and rewire directly in the Animator window.
NPC AI
- NavMesh agent with a visual Animator state machine: Wander, Chase, Attack
- Detects targets by tag
- Hostile / Peaceful toggle: hostile NPCs seek and attack, peaceful ones only wander
Player
- Rigidbody movement already wired to an Idle/Jog/Run blend tree, a grounded jump, and a melee attack
- Works with the legacy Input Manager, the new Input System, or both
Bring your own Models and Animations
The character model and animations in the screenshots and video are not included.
They are shown to demonstrate retargeting onto your own Humanoid rig.
Both Animator Controllers ship fully built, states, parameters, transitions and
blend trees, with the Motion fields left empty. Import your model and clips,
drop them into the slots, and everything runs. No code changes. The Player and NPC
prefabs come with a placeholder capsule body. You can replace them when you add your own model.
Demo scene:
A terrain with a baked NavMesh, a Player and a hostile NPC, floating health bars,
and on-screen controls. Open it and press play.
Combat, kept optional
Health, damage, and death are handled by small, optional sample scripts, separate
from the core AI and Player controllers. Both the NPC and Player attack scripts deal
damage inside a configurable forward cone, 120 degrees by default, so a target that
slips behind mid-swing doesn't take a hit for free. Use them as a starting point,
tune the numbers, or delete them if you're building your own combat system.
Good fit for
- Roguelites and top-down action
- Isometric action
- Any 3D game that needs simple, readable melee enemy AI as a starting point
Movement is world-space, not camera-relative, and the character always faces the
direction it's moving. Great for top-down and isometric. It will work with a
third-person camera, but it won't feel like typical third-person controls, there is
no independent strafe or camera-relative aiming.
Requirements
- Unity 6000.3 or newer (tested on 6000.3.8f1 and 6000.5.3f1)
- A baked NavMesh in your scene
Support