When a NavMeshAgent stubbornly stands still—even though you are calling SetDestination—it usually means one of three things:

  • The agent is not actually on the NavMesh
  • The agent cannot find a valid path to the destination
  • Your layers, areas, or code are silently blocking movement

This guide walks you through a systematic checklist to get your agents moving again.


1. Confirm the Agent Is on the NavMesh

The agent must start on, or be snapped to, a valid NavMesh surface.

  1. Select your NavMeshAgent in the Scene view.
  2. Enable Gizmos and, if needed, toggle Navigation → Agents in the Scene view overlay.
  3. Check:
    • Is the agent’s base inside the blue NavMesh?
    • Or is it:
      • Floating slightly above
      • Embedded in the floor
      • Standing on non-baked geometry

If the agent is not on the mesh:

  • Move it manually onto a blue area.
  • Or, in code, after instancing/spawning:
var agent = GetComponent<NavMeshAgent>();
NavMeshHit hit;
if (NavMesh.SamplePosition(transform.position, out hit, 1.0f, NavMesh.AllAreas))
{
    agent.Warp(hit.position);
}

This ensures the agent starts on a valid NavMesh position.


2. Re-Bake the NavMesh and Check Bake Settings

If the NavMesh itself is wrong, agents cannot move even if your code is fine.

  1. Open Window → AI → Navigation (or Navigation panel).
  2. In the Bake tab:
    • Verify Agent Radius, Height, Max Slope, and Step Height make sense for your character.
    • If values are extreme, ramps or steps may not be walkable.
  3. Make sure:
    • Walkable surfaces are on the correct layer and marked as Navigation Static (or included in the NavMesh Surface).
  4. Click Bake (for the built-in system) or Bake on the NavMeshSurface component (in the newer AI Navigation package).

After baking:

  • Inspect:
    • Are there gaps where agents spawn or where destinations are?
    • Are important routes simply not covered by blue NavMesh?

If necessary, adjust bake settings and rebake until the walkable areas match your intended paths.


3. Verify Agent Settings: Speed, Stopping Distance, and Constraints

Sometimes the agent is technically moving, but you cannot see it or it immediately stops.

On the NavMeshAgent component:

  • Speed:
    • Make sure it is > 0 (for example, 3–5 for walking).
  • Acceleration:
    • If extremely low, agents may seem frozen when they are just accelerating very slowly.
  • Stopping Distance:
    • If this is larger than the distance to the destination, the agent may never need to move.
  • Angular Speed / Obstacle Avoidance:
    • Very restrictive values can make the agent behave oddly around corners or obstacles.

Also check Constraints:

  • If Position or Rotation constraints are active (via Rigidbody or script), they might prevent movement even if the NavMeshAgent tries to update the transform.

Quick test:

  • Temporarily set:
    • speed = 5
    • acceleration = 20
    • stoppingDistance = 0
  • Run again and see if the agent now moves.

4. Check Your SetDestination Calls and Return Value

SetDestination returns true if a path was found and false if no path exists. If you never check the return value, you might think your call is working when it is not.

Example pattern:

public NavMeshAgent agent;

public bool MoveTo(Vector3 target)
{
    bool hasPath = agent.SetDestination(target);
    if (!hasPath)
    {
        Debug.LogWarning($"NavMeshAgent could not find path to {target}");
    }
    return hasPath;
}

During play:

  • Watch the Console:
    • If you see warnings, your destinations may be:
    • Outside the NavMesh
    • On excluded areas
    • Obstructed due to bake settings

Also check that you are not:

  • Calling SetDestination once before the agent is enabled or on the NavMesh.
  • Immediately calling ResetPath or setting isStopped = true in another script.

5. Inspect Layers, Areas, and Obstacle Settings

Layer or area mismatches often cause “invisible walls” for agents.

  1. In your NavMeshAgent:
    • Check Area Mask:
      • If you only allow specific areas, make sure your NavMesh polygons actually use those areas.
  2. For NavMesh Obstacles:
    • Agents cannot walk through obstacles with Carve enabled.
    • Verify you are not accidentally surrounding the agent or destination with carved obstacles.
  3. In the Navigation window:
    • Confirm that important walkable surfaces:
      • Are on the correct layers.
      • Have not been excluded in your NavMesh Surface/Build Settings.

If in doubt, temporarily:

  • Remove or disable obstacles.
  • Simplify the area mask to All Areas.

If the agent suddenly moves, you have located the problem.


6. Use Debug Draws to See the Path

Visualizing the path helps confirm whether the agent is:

  • Not calculating a path at all
  • Calculating a path but failing to move along it

Simple debug script:

using UnityEngine;
using UnityEngine.AI;

public class NavMeshPathDebugger : MonoBehaviour
{
    public NavMeshAgent agent;

    void OnDrawGizmos()
    {
        if (agent == null || agent.path == null)
            return;

        var path = agent.path;
        if (path.corners.Length < 2)
            return;

        Gizmos.color = Color.cyan;
        for (int i = 0; i < path.corners.Length - 1; i++)
        {
            Gizmos.DrawLine(path.corners[i], path.corners[i + 1]);
        }
    }
}

Add this to your agent and watch the Scene view:

  • No line: No valid path; revisit destination, NavMesh, or SetDestination timing.
  • Line appears but agent doesn’t move: Look at constraints, scripts, or isStopped flags.

7. Look for Conflicting Scripts or States

In larger projects, multiple scripts may all try to control the same agent.

Things to search for:

  • Scripts that:
    • Directly set transform.position each frame (overriding the agent)
    • Toggle agent.enabled on and off
    • Set agent.isStopped = true without turning it back off
    • Call ResetPath() constantly

Quick checks:

  • In Play mode, select the agent and watch:
    • Enabled checkbox on NavMeshAgent
    • isStopped value
    • Any custom state machine variables that might be locking movement.

If necessary, temporarily disable other movement or AI scripts and re-test.


8. Verification Checklist

After applying fixes, verify that:

  • [ ] The agent starts on the NavMesh.
  • [ ] The NavMesh is baked with realistic radius/height/step settings.
  • [ ] SetDestination returns true for your target positions.
  • [ ] The agent’s speed/acceleration/stopping distance values are reasonable.
  • [ ] No hidden obstacles or area masks block the route.
  • [ ] No other scripts are freezing movement (isStopped, ResetPath, transform overrides).

If all of these are true and the agent still does not move, try:

  • Testing in a new, empty scene with a simple plane, NavMesh, and one agent.
  • Slowly re-adding systems (obstacles, custom scripts) until the issue reappears.

Related Problems and Next Steps

If this article helped, you may also want to check:

  • Unity NavMesh Agent Not Finding Path - Pathfinding System Fix (when SetDestination fails outright)
  • Unity Physics Not Working - Rigidbody and Collider Fix (Solved) (for physics‑driven movement issues)
  • Unity AI Decision Making Not Working - Behavior Tree Fix (when AI logic, not pathfinding, is the root cause)

Bookmark this page so you can quickly re-run the checklist any time NavMesh Agents start acting stubborn again, and share it with your team if you are all debugging AI movement together.