---
title: "Challenge 3: Create Dynamic & Static Obstacles"
content_type: tutorial
url: "https://learn.unity.com/course/beginner-ai-pathfinding/tutorial/challenge-3-create-dynamic-static-obstacles?language=en"
language: en
container_type: course
container_title: "Getting Started with AI Pathfinding"
container_url: "https://learn.unity.com/course/beginner-ai-pathfinding.md?language=en"
standalone_markdown_url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en"
previous_title: "Challenge 2: Create a NavMesh Agent"
previous_url: "https://learn.unity.com/course/beginner-ai-pathfinding/tutorial/challenge-2-configure-a-navmesh-agent?language=en"
previous_markdown_url: "https://learn.unity.com/course/beginner-ai-pathfinding/tutorial/challenge-2-configure-a-navmesh-agent.md?language=en"
next_title: "Challenge 4: Create NavMesh Off Links"
next_url: "https://learn.unity.com/course/beginner-ai-pathfinding/tutorial/challenge-4-create-navmesh-off-links?language=en"
next_markdown_url: "https://learn.unity.com/course/beginner-ai-pathfinding/tutorial/challenge-4-create-navmesh-off-links.md?language=en"
difficulty: beginner
duration_minutes: 20
unity_version:
  - "2020.2"
  - "2020.1"
  - "2019.4"
  - "2019.3"
  - "2019.2"
  - "2019.1"
  - "2018.4"
  - "2018.3"
  - "2018.2"
  - "2018.1"
  - "2017.4"
  - "2017.3"
  - "2017.2"
  - "2017.1"
  - "5.x"
  - "4.x"
supported_unity_versions:
  - name: "2020.2"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2020.2"
  - name: "2020.1"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2020.1"
  - name: "2019.4"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2019.4"
  - name: "2019.3"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2019.3"
  - name: "2019.2"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2019.2"
  - name: "2019.1"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2019.1"
  - name: "2018.4"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2018.4"
  - name: "2018.3"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2018.3"
  - name: "2018.2"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2018.2"
  - name: "2018.1"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2018.1"
  - name: "2017.4"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2017.4"
  - name: "2017.3"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2017.3"
  - name: "2017.2"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2017.2"
  - name: "2017.1"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=2017.1"
  - name: "5.x"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=5.x"
  - name: "4.x"
    url: "https://learn.unity.com/tutorial/challenge-3-create-dynamic-static-obstacles.md?language=en&version=4.x"
last_updated: "2026-08-04T14:24:09.000Z"
---

# Challenge 3: Create Dynamic & Static Obstacles

Learn to add both dynamic and static obstacles to your Scene to influence navigation and gameplay.

_Create dynamic and static obstacles in the scene_

## 1. Add NavMesh Obstacles to the Scene

1\. Enable the Obstacles GameObject in the Hierarchy

![](https://connect-mediagw.unity.com/h1/20200915/learn/images/ccdebb06-03e6-46ad-9aee-c143df9cf76b_unnamed__3_.png)

![](https://connect-mediagw.unity.com/h1/20200915/learn/images/6525584c-6e5e-40d1-b6c0-d66248013a1f_unnamed__4_.png)

2\. On each of the Obstacle GameObjects, add a NavMeshObstacle component to allow NavMeshAgents to navigate around them.

![](https://connect-mediagw.unity.com/h1/20200915/learn/images/307bbf7d-5320-4bcb-bca5-4c62de7a5ca6_unnamed__5_.png)

3\. Click Play and test out the Obstacle avoidance

![](https://connect-mediagw.unity.com/h1/20200915/learn/images/a786f02a-9d68-4b87-bcdb-7ed3e0e36e91_unnamed__6_.png)
